CMake Find Modules, HINTS, and NO_DEFAULT_PATH
Alexander Neundorf
neundorf at kde.org
Wed Jun 11 00:40:43 CEST 2008
On Monday 09 June 2008, Brad King wrote:
> Hi Folks,
...
> The solution I've committed to CMake HEAD in CVS is to distinguish
> "hint" paths from "guess" paths. For compatibility the PATHS option
> must continue to mean "guess". I've added a new HINTS option that is
> interpreted as "hint" paths. This allows the above code to be written
>
> find_library(FOO_LIB foo HINTS ${BAR_TOLD_ME_FOO_MIGHT_BE_HERE})
>
> The provided hint is preferred over system locations but not over the
> cmake-specific user environment variables or cache entries. I've
> already converted most of the Find* modules provided by CMake to take
> advantage of this feature.
Nice :-)
Minor nitpicking: how about naming that "PREFERRED_PATHS" instead of "HINTS" ?
This may make the meaning even clearer without having to read the docs.
Alex
More information about the Kde-buildsystem
mailing list