[cmake-developers] Relation between CMAKE_PREFIX_PATH and CMAKE_FIND_ROOT_PATH
Brad King
brad.king at kitware.com
Tue Jan 3 13:58:29 EST 2012
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
More information about the cmake-developers
mailing list