summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-07 18:37:19 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-07 18:37:19 (GMT)
commit1b5a986a427301841fddbf79bfa9016309fe28d4 (patch)
tree0826458ec2dbb8238c06fb3cd20bc801e7845e99
parentfff1c6d275cd24294cb0848b245d166b77e55c12 (diff)
downloadCMake-1b5a986a427301841fddbf79bfa9016309fe28d4.zip
CMake-1b5a986a427301841fddbf79bfa9016309fe28d4.tar.gz
CMake-1b5a986a427301841fddbf79bfa9016309fe28d4.tar.bz2
Do not collapse path of NOTFOUND values
In cmMakefile::AddCacheDefinition we collapse paths specified in PATH or FILEPATH cache entries originally specified on the command line with UNINITALIZED type. This commit fixes the logic to avoid collapsing <var>-NOTFOUND and other false values. The change allows other CMake code to force a NOTFOUND value on an entry with UNINITALIZED type.
-rw-r--r--Source/cmMakefile.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 914a8c5..6fc0dd4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1719,7 +1719,10 @@ void cmMakefile::AddCacheDefinition(const char* name, const char* value,
cmSystemTools::ExpandListArgument(val, files);
for ( cc = 0; cc < files.size(); cc ++ )
{
- files[cc] = cmSystemTools::CollapseFullPath(files[cc].c_str());
+ if(!cmSystemTools::IsOff(files[cc].c_str()))
+ {
+ files[cc] = cmSystemTools::CollapseFullPath(files[cc].c_str());
+ }
if ( cc > 0 )
{
nvalue += ";";