summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2012-07-21 13:37:46 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-22 19:08:40 (GMT)
commit2c7a451de003782b1ba5e47ab377f33f1fa5c4e5 (patch)
tree8d5700d778df484bbeab7eb5a893fe346373fce8 /Source/cmGlobalVisualStudioGenerator.cxx
parentaddefc2ae3b33a75a7152730146b46b319118a24 (diff)
downloadCMake-2c7a451de003782b1ba5e47ab377f33f1fa5c4e5.zip
CMake-2c7a451de003782b1ba5e47ab377f33f1fa5c4e5.tar.gz
CMake-2c7a451de003782b1ba5e47ab377f33f1fa5c4e5.tar.bz2
VS: Cleanup AddPlatformDefinitions() of Visual Studio generators
Move adding of definitions into cmGlobalVisualStudioGenerator to share code and avoid duplicate architecture string literals.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index a2b4c65..feb3ac9 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -21,6 +21,8 @@
//----------------------------------------------------------------------------
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator()
{
+ this->ArchitectureId = "X86";
+ this->VersionId = 0;
}
//----------------------------------------------------------------------------
@@ -489,6 +491,18 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
}
//----------------------------------------------------------------------------
+void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf)
+{
+ mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId);
+ mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId);
+
+ if (this->VersionId)
+ {
+ mf->AddDefinition(this->VersionId, "1");
+ }
+}
+
+//----------------------------------------------------------------------------
std::string cmGlobalVisualStudioGenerator::GetUtilityDepend(cmTarget* target)
{
UtilityDependsMap::iterator i = this->UtilityDepends.find(target);