diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-13 19:44:14 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-13 22:16:06 (GMT) |
commit | 871ab98dad2ed9d504a081a0ffa62b438793cbe4 (patch) | |
tree | 781154b9080a723554f97cbe46d2be19aac7ac09 /Source/cmMakefile.cxx | |
parent | c4361a265b32acaa4a84c1ab14fecee1bfe49d33 (diff) | |
download | CMake-871ab98dad2ed9d504a081a0ffa62b438793cbe4.zip CMake-871ab98dad2ed9d504a081a0ffa62b438793cbe4.tar.gz CMake-871ab98dad2ed9d504a081a0ffa62b438793cbe4.tar.bz2 |
cmMakefile: Set internal definitions directly.
The usage tracking of cmMakefile::AddDefinition is not needed.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 73d3522..a258536 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -120,19 +120,19 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$"); #endif - this->AddDefinition("CMAKE_SOURCE_DIR", + this->StateSnapshot.SetDefinition("CMAKE_SOURCE_DIR", this->GetCMakeInstance()->GetHomeDirectory()); - this->AddDefinition("CMAKE_BINARY_DIR", + this->StateSnapshot.SetDefinition("CMAKE_BINARY_DIR", this->GetCMakeInstance()->GetHomeOutputDirectory()); { const char* dir = this->StateSnapshot.GetDirectory().GetCurrentSource(); if (dir) { - this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", dir); + this->StateSnapshot.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", dir); } else { - this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->StateSnapshot.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", this->GetCMakeInstance()->GetHomeDirectory()); } } @@ -141,11 +141,11 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, if (dir) { cmSystemTools::MakeDirectory(dir); - this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", dir); + this->StateSnapshot.SetDefinition("CMAKE_CURRENT_BINARY_DIR", dir); } else { - this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->StateSnapshot.SetDefinition("CMAKE_CURRENT_BINARY_DIR", this->GetCMakeInstance()->GetHomeOutputDirectory()); } } |