summaryrefslogtreecommitdiffstats
path: root/Source/cmFindBase.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-09 19:22:09 (GMT)
committerBrad King <brad.king@kitware.com>2008-06-09 19:22:09 (GMT)
commitd50785e26e68ba58aed6e59cb0cb8dcba7eb06a1 (patch)
tree27cd2167c4bccdb7ff84ddea160cb95a68b9785e /Source/cmFindBase.cxx
parentfdb17d604cd8e353bfedcc256be2bf12f2071ded (diff)
downloadCMake-d50785e26e68ba58aed6e59cb0cb8dcba7eb06a1.zip
CMake-d50785e26e68ba58aed6e59cb0cb8dcba7eb06a1.tar.gz
CMake-d50785e26e68ba58aed6e59cb0cb8dcba7eb06a1.tar.bz2
ENH: Make find_* command search order more intuitive.
- The CMAKE_PREFIX_PATH and similar variables have both environment and CMake cache versions. - Previously the environment value was checked before the cache value. - Now the cache value is favored because it is more specific.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r--Source/cmFindBase.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index ff3e99d..4ff14b6 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -66,18 +66,15 @@ cmFindBase::cmFindBase()
"If NO_DEFAULT_PATH is specified, then no additional paths are "
"added to the search. "
"If NO_DEFAULT_PATH is not specified, the search process is as follows:\n"
- "1. Search cmake specific environment variables. This "
- "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
- ""
+ "1. Search paths specified in cmake-specific cache variables. "
+ "These are intended to be used on the command line with a -DVAR=value. "
+ "This can be skipped if NO_CMAKE_PATH is passed.\n"
" <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
" CMAKE_XXX_PATH\n"
" CMAKE_XXX_MAC_PATH\n"
- "2. Search cmake variables with the same names as "
- "the cmake specific environment variables. These "
- "are intended to be used on the command line with a "
- "-DVAR=value. This can be skipped if NO_CMAKE_PATH "
- "is passed.\n"
- ""
+ "2. Search paths specified in cmake-specific environment variables. "
+ "These are intended to be set in the user's shell configuration. "
+ "This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
" <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
" CMAKE_XXX_PATH\n"
" CMAKE_XXX_MAC_PATH\n"
@@ -282,8 +279,8 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
void cmFindBase::ExpandPaths()
{
- this->AddCMakeEnvironmentPath();
this->AddCMakeVariablePath();
+ this->AddCMakeEnvironmentPath();
this->AddUserHintsPath();
this->AddSystemEnvironmentPath();
this->AddCMakeSystemVariablePath();