diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-06-30 15:31:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-06-30 15:31:41 (GMT) |
commit | 40fbba22a48271d6ee358f766ba680729e56b253 (patch) | |
tree | a5154b69285493c868c4af4ef2724eabbf6408af /Source/kwsys | |
parent | 35033f248d58e27ff453d6729187f51ba4a36ab0 (diff) | |
download | CMake-40fbba22a48271d6ee358f766ba680729e56b253.zip CMake-40fbba22a48271d6ee358f766ba680729e56b253.tar.gz CMake-40fbba22a48271d6ee358f766ba680729e56b253.tar.bz2 |
ENH: add CMAKE_FILE_PATH, CMAKE_PROGRAM_PATH, CMAKE_LIBRARY_PATH, and search them first, PATH second, and last the paths listed in the FIND call
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index d0601ff..c13ffc2 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1096,7 +1096,8 @@ kwsys_stl::string SystemTools::FindFile(const char* name, const kwsys_stl::vector<kwsys_stl::string>& userPaths) { // Add the system search path to our path first - kwsys_stl::vector<kwsys_stl::string> path; + kwsys_stl::vector<kwsys_stl::string> path; + SystemTools::GetPath(path, "CMAKE_FILE_PATH"); SystemTools::GetPath(path); // now add the additional paths path.insert(path.end(), userPaths.begin(), userPaths.end()); @@ -1145,13 +1146,14 @@ kwsys_stl::string SystemTools::FindProgram( { return SystemTools::CollapseFullPath(tryPath.c_str()); } - - // Add the system search path to our path. kwsys_stl::vector<kwsys_stl::string> path; + SystemTools::GetPath(path, "CMAKE_PROGRAM_PATH"); + // Add the system search path to our path. if (!no_system_path) { SystemTools::GetPath(path); } + // now add the additional paths path.insert(path.end(), userPaths.begin(), userPaths.end()); |