diff options
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 0f8cdca..97a275a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -133,7 +133,11 @@ void cmLocalUnixMakefileGenerator3::Generate() // Record whether some options are enabled to avoid checking many // times later. if (!this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile()) { - this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE"); + if (this->Makefile->IsSet("CMAKE_COLOR_MAKEFILE")) { + this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE"); + } else { + this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_DIAGNOSTICS"); + } } this->SkipPreprocessedSourceRules = this->Makefile->IsOn("CMAKE_SKIP_PREPROCESSED_SOURCE_RULES"); @@ -1508,13 +1512,12 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( } // Setup relative path top directories. - if (cmValue relativePathTopSource = - mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE")) { - this->SetRelativePathTopSource(*relativePathTopSource); - } - if (cmValue relativePathTopBinary = - mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY")) { - this->SetRelativePathTopBinary(*relativePathTopBinary); + cmValue relativePathTopSource = + mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE"); + cmValue relativePathTopBinary = + mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY"); + if (relativePathTopSource && relativePathTopBinary) { + this->SetRelativePathTop(*relativePathTopSource, *relativePathTopBinary); } } else { cmSystemTools::Error("Directory Information file not found"); @@ -1849,7 +1852,7 @@ void cmLocalUnixMakefileGenerator3::ClearDependencies(cmMakefile* mf, cmSystemTools::Touch(DepTimestamp.GenericString(), true); // clear the dependencies files generated by the compiler - std::vector<std::string> dependencies = cmExpandedList(depsFiles); + std::vector<std::string> dependencies = cmExpandedList(depsFiles, true); cmDependsCompiler depsManager; depsManager.SetVerbose(verbose); depsManager.ClearDependencies(dependencies); |