From 871ab98dad2ed9d504a081a0ffa62b438793cbe4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 13 Oct 2015 21:44:14 +0200 Subject: cmMakefile: Set internal definitions directly. The usage tracking of cmMakefile::AddDefinition is not needed. --- Source/cmMakefile.cxx | 12 ++++++------ 1 file 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()); } } -- cgit v0.12