Преглед изворни кода

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.
Brad King пре 16 година
родитељ
комит
1b5a986a42
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      Source/cmMakefile.cxx

+ 4 - 1
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 += ";";