summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-13 19:48:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-13 22:16:20 (GMT)
commit20b95ef8c83fbcb7705e72c85c9de18ff420562f (patch)
tree7241038f255ebe43bd6fefd8e2efd7533ae3167d /Source/cmMakefile.cxx
parent841164cb36650574a1a7363c78e4cdf28d5d37fd (diff)
downloadCMake-20b95ef8c83fbcb7705e72c85c9de18ff420562f.zip
CMake-20b95ef8c83fbcb7705e72c85c9de18ff420562f.tar.gz
CMake-20b95ef8c83fbcb7705e72c85c9de18ff420562f.tar.bz2
cmState: Initialize default definitions immediately.
Don't leave this as cmMakefile responsibility.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx55
1 files changed, 0 insertions, 55 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f804d06..22d24d7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -87,8 +87,6 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
this->DefineFlags = " ";
- this->AddDefaultDefinitions();
-
this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)");
this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)");
this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)");
@@ -3123,59 +3121,6 @@ void cmMakefile::RemoveVariablesInString(std::string& source,
}
}
-/**
- * Add the default definitions to the makefile. These values must not
- * be dependent on anything that isn't known when this cmMakefile instance
- * is constructed.
- */
-void cmMakefile::AddDefaultDefinitions()
-{
-/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set.
- With CMake must separate between target and host platform. In most cases
- the tests for WIN32, UNIX and APPLE will be for the target system, so an
- additional set of variables for the host system is required ->
- CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE.
- WIN32, UNIX and APPLE are now set in the platform files in
- Modules/Platforms/.
- To keep cmake scripts (-P) and custom language and compiler modules
- working, these variables are still also set here in this place, but they
- will be reset in CMakeSystemSpecificInformation.cmake before the platform
- files are executed. */
-#if defined(_WIN32)
- this->StateSnapshot.SetDefinition("WIN32", "1");
- this->StateSnapshot.SetDefinition("CMAKE_HOST_WIN32", "1");
-#else
- 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->StateSnapshot.SetDefinition("WIN32", "1");
- this->StateSnapshot.SetDefinition("CMAKE_HOST_WIN32", "1");
- }
-#endif
-#if defined(__APPLE__)
- this->StateSnapshot.SetDefinition("APPLE", "1");
- this->StateSnapshot.SetDefinition("CMAKE_HOST_APPLE", "1");
-#endif
-
- char temp[1024];
- sprintf(temp, "%d", cmVersion::GetMinorVersion());
- this->StateSnapshot.SetDefinition("CMAKE_MINOR_VERSION", temp);
- sprintf(temp, "%d", cmVersion::GetMajorVersion());
- this->StateSnapshot.SetDefinition("CMAKE_MAJOR_VERSION", temp);
- sprintf(temp, "%d", cmVersion::GetPatchVersion());
- this->StateSnapshot.SetDefinition("CMAKE_PATCH_VERSION", temp);
- sprintf(temp, "%d", cmVersion::GetTweakVersion());
- this->StateSnapshot.SetDefinition("CMAKE_TWEAK_VERSION", temp);
- this->StateSnapshot.SetDefinition("CMAKE_VERSION",
- cmVersion::GetCMakeVersion());
-
- this->StateSnapshot.SetDefinition("CMAKE_FILES_DIRECTORY",
- cmake::GetCMakeFilesDirectory());
-}
-
//----------------------------------------------------------------------------
std::string
cmMakefile::GetConfigurations(std::vector<std::string>& configs,