diff options
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r-- | Source/cmProjectCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index acdb09f..6950c19 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -71,7 +71,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, // CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build // will work. if (!mf.GetDefinition("CMAKE_PROJECT_NAME") || mf.IsRootMakefile()) { - mf.AddDefinition("CMAKE_PROJECT_NAME", projectName); + mf.RemoveDefinition("CMAKE_PROJECT_NAME"); mf.AddCacheDefinition("CMAKE_PROJECT_NAME", projectName, "Value Computed by CMake", cmStateEnums::STATIC); } @@ -395,7 +395,7 @@ static void TopLevelCMakeVarCondSet(cmMakefile& mf, std::string const& name, // in the same CMakeLists.txt file, and it is the top level // CMakeLists.txt file, then go with the last one. if (!mf.GetDefinition(name) || mf.IsRootMakefile()) { - mf.AddDefinition(name, value); + mf.RemoveDefinition(name); mf.AddCacheDefinition(name, value, "Value Computed by CMake", cmStateEnums::STATIC); } |