diff options
author | Brad King <brad.king@kitware.com> | 2015-10-30 12:38:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-30 12:38:13 (GMT) |
commit | 1178b5366224eca862257fbb3473929e01b99346 (patch) | |
tree | 3ab046b2db6ba3123f860c9bf5c7dbde84d911d0 /Source | |
parent | 1227ea38e5cd64e72f83e96705266c8307ed6ba0 (diff) | |
parent | 31e6571cca3267cf1f5e17df7c985521211885ef (diff) | |
download | CMake-1178b5366224eca862257fbb3473929e01b99346.zip CMake-1178b5366224eca862257fbb3473929e01b99346.tar.gz CMake-1178b5366224eca862257fbb3473929e01b99346.tar.bz2 |
Merge branch 'fix-find_program-regression' into release
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindProgramCommand.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index e64ed87..219ad48 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -176,6 +176,13 @@ std::string cmFindProgramCommand::FindNormalProgramNamesPerDir() { helper.AddName(*ni); } + + // Check for the names themselves (e.g. absolute paths). + if (helper.CheckDirectory(std::string())) + { + return helper.BestPath; + } + // Search every directory. for (std::vector<std::string>::const_iterator p = this->SearchPaths.begin(); p != this->SearchPaths.end(); ++p) @@ -200,6 +207,12 @@ std::string cmFindProgramCommand::FindNormalProgramDirsPerName() // Switch to searching for this name. helper.SetName(*ni); + // Check for the name by itself (e.g. an absolute path). + if (helper.CheckDirectory(std::string())) + { + return helper.BestPath; + } + // Search every directory. for (std::vector<std::string>::const_iterator p = this->SearchPaths.begin(); |