diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-13 19:45:02 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-13 22:16:06 (GMT) |
commit | 84e0776e77e625ab43c1a5b2031a06a035ae0210 (patch) | |
tree | e90cbbbb97f0cea970c2eb8fcad9ac89fd5415df | |
parent | 871ab98dad2ed9d504a081a0ffa62b438793cbe4 (diff) | |
download | CMake-84e0776e77e625ab43c1a5b2031a06a035ae0210.zip CMake-84e0776e77e625ab43c1a5b2031a06a035ae0210.tar.gz CMake-84e0776e77e625ab43c1a5b2031a06a035ae0210.tar.bz2 |
cmMakefile: Set default internal definitions directly.
The usage tracking of cmMakefile::AddDefinition is not needed.
-rw-r--r-- | Source/cmMakefile.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index a258536..eea9d67 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -50,7 +50,6 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator, { this->IsSourceFileTryCompile = false; - // Initialize these first since AddDefaultDefinitions calls AddDefinition this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused(); this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars(); @@ -3171,36 +3170,37 @@ void cmMakefile::AddDefaultDefinitions() will be reset in CMakeSystemSpecificInformation.cmake before the platform files are executed. */ #if defined(_WIN32) - this->AddDefinition("WIN32", "1"); - this->AddDefinition("CMAKE_HOST_WIN32", "1"); + this->StateSnapshot.SetDefinition("WIN32", "1"); + this->StateSnapshot.SetDefinition("CMAKE_HOST_WIN32", "1"); #else - this->AddDefinition("UNIX", "1"); - this->AddDefinition("CMAKE_HOST_UNIX", "1"); + this->StateSnapshot.SetDefinition("UNIX", "1"); + this->StateSnapshot.SetDefinition("CMAKE_HOST_UNIX", "1"); #endif #if defined(__CYGWIN__) if(cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32"))) { - this->AddDefinition("WIN32", "1"); - this->AddDefinition("CMAKE_HOST_WIN32", "1"); + this->StateSnapshot.SetDefinition("WIN32", "1"); + this->StateSnapshot.SetDefinition("CMAKE_HOST_WIN32", "1"); } #endif #if defined(__APPLE__) - this->AddDefinition("APPLE", "1"); - this->AddDefinition("CMAKE_HOST_APPLE", "1"); + this->StateSnapshot.SetDefinition("APPLE", "1"); + this->StateSnapshot.SetDefinition("CMAKE_HOST_APPLE", "1"); #endif char temp[1024]; sprintf(temp, "%d", cmVersion::GetMinorVersion()); - this->AddDefinition("CMAKE_MINOR_VERSION", temp); + this->StateSnapshot.SetDefinition("CMAKE_MINOR_VERSION", temp); sprintf(temp, "%d", cmVersion::GetMajorVersion()); - this->AddDefinition("CMAKE_MAJOR_VERSION", temp); + this->StateSnapshot.SetDefinition("CMAKE_MAJOR_VERSION", temp); sprintf(temp, "%d", cmVersion::GetPatchVersion()); - this->AddDefinition("CMAKE_PATCH_VERSION", temp); + this->StateSnapshot.SetDefinition("CMAKE_PATCH_VERSION", temp); sprintf(temp, "%d", cmVersion::GetTweakVersion()); - this->AddDefinition("CMAKE_TWEAK_VERSION", temp); - this->AddDefinition("CMAKE_VERSION", cmVersion::GetCMakeVersion()); + this->StateSnapshot.SetDefinition("CMAKE_TWEAK_VERSION", temp); + this->StateSnapshot.SetDefinition("CMAKE_VERSION", + cmVersion::GetCMakeVersion()); - this->AddDefinition("CMAKE_FILES_DIRECTORY", + this->StateSnapshot.SetDefinition("CMAKE_FILES_DIRECTORY", cmake::GetCMakeFilesDirectory()); } |