From 1b5a986a427301841fddbf79bfa9016309fe28d4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 7 Oct 2009 14:37:19 -0400 Subject: 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 -NOTFOUND and other false values. The change allows other CMake code to force a NOTFOUND value on an entry with UNINITALIZED type. --- Source/cmMakefile.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 += ";"; -- cgit v0.12