summaryrefslogtreecommitdiffstats
path: root/Source/cmFindProgramCommand.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-05-12 15:31:45 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-05-12 15:31:45 (GMT)
commit1ad05f9e6d423187b4426be6117820cb791e86ba (patch)
tree84bca8818e63c26032792349c8a5c11e95f44501 /Source/cmFindProgramCommand.cxx
parentce314986375cc2f2675266b7cbc6a46759bdeee2 (diff)
downloadCMake-1ad05f9e6d423187b4426be6117820cb791e86ba.zip
CMake-1ad05f9e6d423187b4426be6117820cb791e86ba.tar.gz
CMake-1ad05f9e6d423187b4426be6117820cb791e86ba.tar.bz2
ENH/FIX: add NO_SYSTEM_PATH option + fix command usage
Diffstat (limited to 'Source/cmFindProgramCommand.cxx')
-rw-r--r--Source/cmFindProgramCommand.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index 3d24899..c675973 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -76,6 +76,7 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
bool foundName = false;
bool foundPath = false;
bool doingNames = true;
+ bool no_system_path = false;
for (unsigned int j = 1; j < args.size(); ++j)
{
if(args[j] == "NAMES")
@@ -88,6 +89,10 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
doingNames = false;
foundPath = true;
}
+ else if (args[j] == "NO_SYSTEM_PATH")
+ {
+ no_system_path = true;
+ }
else
{
if(doingNames)
@@ -123,7 +128,9 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
i != names.end() ; ++i)
{
// Try to find the program.
- std::string result = cmSystemTools::FindProgram(i->c_str(), path);
+ std::string result = cmSystemTools::FindProgram(i->c_str(),
+ path,
+ no_system_path);
if(result != "")
{
// Save the value in the cache