* CMAKE_LIBRARY_PATH & co. [not found] <E1VVP5Z-0005c4-TI@vcs.savannah.gnu.org> @ 2013-10-14 7:15 ` Ludovic Courtès 2013-10-14 7:23 ` Lluís Batlle i Rossell 0 siblings, 1 reply; 3+ messages in thread From: Ludovic Courtès @ 2013-10-14 7:15 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel, Lluís Batlle Andreas Enge <andreas@enge.fr> skribis: > commit e78fd4ca636a19bc286747f8d91bda22cd8f08fd > Author: Andreas Enge <andreas@enge.fr> > Date: Sun Oct 13 18:02:49 2013 +0200 > > guix: Make cmake build system aware of usual paths. > > * guix/build/cmake-build-system.scm (configure): Set CMAKE_LIBRARY_PATH to > LIBRARY_PATH and CMAKE_INCLUDE_PATH to CPATH. I think this was discussed on IRC yesterday, but I’m not sure I got it: are these needed because CMake explicitly looks for files in these directories instead of just running the compiler? That would be a serious flaw of CMake. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: CMAKE_LIBRARY_PATH & co. 2013-10-14 7:15 ` CMAKE_LIBRARY_PATH & co Ludovic Courtès @ 2013-10-14 7:23 ` Lluís Batlle i Rossell 2013-10-14 12:31 ` Ludovic Courtès 0 siblings, 1 reply; 3+ messages in thread From: Lluís Batlle i Rossell @ 2013-10-14 7:23 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Mon, Oct 14, 2013 at 09:15:25AM +0200, Ludovic Courtès wrote: > Andreas Enge <andreas@enge.fr> skribis: > > > commit e78fd4ca636a19bc286747f8d91bda22cd8f08fd > > Author: Andreas Enge <andreas@enge.fr> > > Date: Sun Oct 13 18:02:49 2013 +0200 > > > > guix: Make cmake build system aware of usual paths. > > > > * guix/build/cmake-build-system.scm (configure): Set CMAKE_LIBRARY_PATH to > > LIBRARY_PATH and CMAKE_INCLUDE_PATH to CPATH. > > I think this was discussed on IRC yesterday, but I’m not sure I got it: > are these needed because CMake explicitly looks for files in these > directories instead of just running the compiler? > > That would be a serious flaw of CMake. Right; for what I understand, FIND_LIBRARY, and FIND_PATH, look for files in specific directories. Then cmake takes a decision based in what it finds. A shared object, a static lib, ... For header files, you can do: FIND_PATH(HEADERS file.h) # Finds the directory having that file INCLUDE_DIRECTORIES(${HEADERS}) # Adds the respective -I flag in compilation It may be related to cmake being able to tune very narrowly the -I/-L flags per project target. I'm not that anti-cmake; I find the approach of "look for files" quite easy to understand. :) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: CMAKE_LIBRARY_PATH & co. 2013-10-14 7:23 ` Lluís Batlle i Rossell @ 2013-10-14 12:31 ` Ludovic Courtès 0 siblings, 0 replies; 3+ messages in thread From: Ludovic Courtès @ 2013-10-14 12:31 UTC (permalink / raw) To: Lluís Batlle i Rossell; +Cc: guix-devel Lluís Batlle i Rossell <viric@viric.name> skribis: > On Mon, Oct 14, 2013 at 09:15:25AM +0200, Ludovic Courtès wrote: >> Andreas Enge <andreas@enge.fr> skribis: >> >> > commit e78fd4ca636a19bc286747f8d91bda22cd8f08fd >> > Author: Andreas Enge <andreas@enge.fr> >> > Date: Sun Oct 13 18:02:49 2013 +0200 >> > >> > guix: Make cmake build system aware of usual paths. >> > >> > * guix/build/cmake-build-system.scm (configure): Set CMAKE_LIBRARY_PATH to >> > LIBRARY_PATH and CMAKE_INCLUDE_PATH to CPATH. >> >> I think this was discussed on IRC yesterday, but I’m not sure I got it: >> are these needed because CMake explicitly looks for files in these >> directories instead of just running the compiler? >> >> That would be a serious flaw of CMake. > > Right; for what I understand, FIND_LIBRARY, and FIND_PATH, look for files in > specific directories. Then cmake takes a decision based in what it finds. A > shared object, a static lib, ... Blech. That’s flawed because CMake’s auto-configuration rules behave differently from what the compiler/linker actually do. So its configuration phase may end up making decisions based on erroneous information. Thanks for the explanations, Ludo’. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-14 12:36 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1VVP5Z-0005c4-TI@vcs.savannah.gnu.org> 2013-10-14 7:15 ` CMAKE_LIBRARY_PATH & co Ludovic Courtès 2013-10-14 7:23 ` Lluís Batlle i Rossell 2013-10-14 12:31 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).