[cmake-developers] Relation between CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH
Hi All, I have been giving wrong advice about the usage of CMAKE_FIND_ROOT_PATH which seems to be reserved for cross-compiling whereas CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_PROGRAM_PATH CMAKE_LIBRARY_PATH CMAKE_IGNORE_PATH could someone enlight me about the intended relationship between those var and their SYSTEM counterpart CMAKE_SYSTEM_*_PATH ? CMAKE_*_PATH a -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Relation between CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH
Sorry sent too soon, finger slipped. ... I have been giving wrong advice about the usage of CMAKE_FIND_ROOT_PATH which seems to be reserved for cross-compiling whereas CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_PROGRAM_PATH CMAKE_LIBRARY_PATH CMAKE_IGNORE_PATH are meant to be used in the general case. Could someone enlighten me about the intended usage and relationship between those vars and their SYSTEM counterpart CMAKE_SYSTEM_*_PATH ? And may be why do we need CMAKE_FIND_ROOT_PATH for cross-compiling if CMAKE_PREFIX_PATH already existed? CMAKE_*_PATH are documented (through --help-variables) whereas CMAKE_FIND_ROOT_PATH doesn't seem to be currently. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Relation between CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH
On Tuesday 03 January 2012, Eric Noulard wrote: Sorry sent too soon, finger slipped. ... I have been giving wrong advice about the usage of CMAKE_FIND_ROOT_PATH which seems to be reserved for cross-compiling whereas CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_PROGRAM_PATH CMAKE_LIBRARY_PATH CMAKE_IGNORE_PATH are meant to be used in the general case. Could someone enlighten me about the intended usage and relationship between those vars and their SYSTEM counterpart CMAKE_SYSTEM_*_PATH ? CMAKE_INCLUDE_PATH is a list of directories used by find_file() and find_path(), could include /home/mystuff/include/ CMAKE_PROGRAM_PATH is a list of directories used by find_program(), could include /home/mystuff/bin/ CMAKE_LIBRARY_PATH is a list of directories used by find_library(), could include /home/mystuff/lib/ These were added 2006 I think. Late 2007 or maybe 2008 came CMAKE_PREFIX_PATH. This make the variables above mostly unnecessary. It is a list of directories, where the respective subdirectory is appended by find_program(), find_file() etc. So for the example above you would be done by setting it to /home/mystuff/ . The directories from these variables are checked before the directories given via PATHS or HINTS. CMAKE_FIND_ROOT_PATH is different (and was added before CMAKE_PREFIX_PATH), it is a list of directories which contain root directories where the filesystem of the target system in a cross-compilation setting is location. You set it e.g. to /opt/eldk/arm/. Then cmake will prepend this root dir to each of the directories it would check otherwise. I.e. find_program() will check in /opt/eldk/arm/bin/, /opt/eldk/arm/usr/bin/, /opt/eldk/arm/usr/local/bin/, /opt/eldk/arm/usr/X11/bin/, etc. I.e. the assumption is that under those prefixes a whole normal filesystem is located. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Relation between CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH
On 1/3/2012 1:40 PM, Eric Noulard wrote: I have been giving wrong advice about the usage of CMAKE_FIND_ROOT_PATH which seems to be reserved for cross-compiling whereas Correct. CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_PROGRAM_PATH CMAKE_LIBRARY_PATH CMAKE_IGNORE_PATH are meant to be used in the general case. Correct. Could someone enlighten me about the intended usage and relationship between those vars and their SYSTEM counterpart CMAKE_SYSTEM_*_PATH ? The SYSTEM_ ones are provided by CMake and are searched later than the others. And may be why do we need CMAKE_FIND_ROOT_PATH for cross-compiling if CMAKE_PREFIX_PATH already existed? CMAKE_FIND_ROOT_PATH reroots all paths regardless of where they came from (evauation of the other variables, arguments to the find_* commands, etc.). Variables like CMAKE_PREFIX_PATH just add more paths. Their values do not need to know about the cross-compiling toolchain root so they can just use /bin. CMAKE_*_PATH are documented (through --help-variables) whereas CMAKE_FIND_ROOT_PATH doesn't seem to be currently. Alex? -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers