Following the topic branch to separately maintain each type of search path,
I'm working on adding a feature for cross-compiling to separately control
how each type of search path gets re-rooted. Currently, the options
CMAKE_FIND_ROOT_PATH_MODE_{INCLUDE_LIBRARY_PROGRAM} can be set to ONLY,
NEVER, or BOTH. This takes effect for all search paths, both CMake
determined and user-specifies (through HINTS and PATHS options). Before
putting the time and effort into implementing the feature this way, I
wanted to get some feedback on the design first:
My approach to control the path types independently is to allow the
variable to be specified as either a single mode, applying to all paths, or
a named list of the form "PATH_TYPE1 MODE1 PATH_TYPE2_MODE2..." much in the
way that properties are specified. The following search path groups can be
specified:
- CMAKE_PATH
- CMAKE_ENVIRONMENT_PATH
- USER_HINTS_PATH
- SYSTEM_ENVIRONMENT_PATH
- CMAKE_SYSTEM_PATH
- USER_GUESS_PATH
In addition to each search path type, there will also be defined path
groups:
- ALL - All search paths
- DEFAULT
- CMAKE_PATH
- CMAKE_ENVIRONMENT_PATH
- SYSTEM_ENVIRONMENT_PATH
- CMAKE_SYSTEM_PATH
- USER - User hints and user guess paths
If one had:
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALL ONLY HINTS NEVER)
Then the following modes would be set:
- find_program: All search paths set to never
- find_library: user hints would never be re-rooted and all others would
operate in ONLY mode.
- find_file: All search paths set to BOTH mode since that's the default
behavior.
- Chuck
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers