summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-05-12 15:32:29 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-05-12 15:32:29 (GMT)
commitebebe660dfb8751e801168e5a2e8efb2acf7854d (patch)
tree524dbfe77add679e5665603da96c1195121234f5 /Source/cmSystemTools.cxx
parent1ad05f9e6d423187b4426be6117820cb791e86ba (diff)
downloadCMake-ebebe660dfb8751e801168e5a2e8efb2acf7854d.zip
CMake-ebebe660dfb8751e801168e5a2e8efb2acf7854d.tar.gz
CMake-ebebe660dfb8751e801168e5a2e8efb2acf7854d.tar.bz2
ENH: add no_system_path option to FindProgram so that the PATH is ignored
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 43924b6..0eaaed5 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1428,7 +1428,8 @@ std::string cmSystemTools::FindFile(const char* name,
* found. Otherwise, the empty string is returned.
*/
std::string cmSystemTools::FindProgram(const char* name,
- const std::vector<std::string>& userPaths)
+ const std::vector<std::string>& userPaths,
+ bool no_system_path)
{
// See if the executable exists as written.
if(cmSystemTools::FileExists(name) &&
@@ -1446,7 +1447,10 @@ std::string cmSystemTools::FindProgram(const char* name,
// Add the system search path to our path.
std::vector<std::string> path = userPaths;
- cmSystemTools::GetPath(path);
+ if (!no_system_path)
+ {
+ cmSystemTools::GetPath(path);
+ }
for(std::vector<std::string>::const_iterator p = path.begin();
p != path.end(); ++p)