summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-10 18:40:52 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-05-10 18:40:52 (GMT)
commit541d20dd9f2c1bf94d6a4be822778569c6283574 (patch)
treee4ed1f81370e2a3987526111ce7732d752aa76e0 /Source
parentd5e1e187c828569a5a26da35114d67b636b21908 (diff)
parentb30b32a4931080280680aa5b439c0d4918553c56 (diff)
downloadCMake-541d20dd9f2c1bf94d6a4be822778569c6283574.zip
CMake-541d20dd9f2c1bf94d6a4be822778569c6283574.tar.gz
CMake-541d20dd9f2c1bf94d6a4be822778569c6283574.tar.bz2
Merge topic 'find-command-prefix-from-PATH-windows-only'
b30b32a4 Drop find_(library|file|path) prefixes from PATH on non-Windows
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFindBase.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 90091c1..995097f 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -276,10 +276,16 @@ void cmFindBase::FillSystemEnvironmentPath()
if(!this->EnvironmentPath.empty())
{
paths.AddEnvPath(this->EnvironmentPath);
+#if defined(_WIN32) || defined(__CYGWIN__)
paths.AddEnvPrefixPath("PATH", true);
+ paths.AddEnvPath("PATH");
+#endif
+ }
+ else
+ {
+ // Add PATH
+ paths.AddEnvPath("PATH");
}
- // Add PATH
- paths.AddEnvPath("PATH");
paths.AddSuffixes(this->SearchPathSuffixes);
}