diff --git a/Source/cmGlobalVisualStudio10IA64Generator.cxx b/Source/cmGlobalVisualStudio10IA64Generator.cxx index 40bc30774..fabe717bb 100644 --- a/Source/cmGlobalVisualStudio10IA64Generator.cxx +++ b/Source/cmGlobalVisualStudio10IA64Generator.cxx @@ -17,6 +17,7 @@ cmGlobalVisualStudio10IA64Generator::cmGlobalVisualStudio10IA64Generator() { this->ArchitectureId = "x64"; + this->AdditionalPlatformDefinition = "CMAKE_FORCE_IA64"; } //---------------------------------------------------------------------------- @@ -28,14 +29,6 @@ void cmGlobalVisualStudio10IA64Generator entry.Full = ""; } -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio10IA64Generator -::AddPlatformDefinitions(cmMakefile* mf) -{ - this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf); - mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE"); -} - //---------------------------------------------------------------------------- void cmGlobalVisualStudio10IA64Generator ::EnableLanguage(std::vector const& languages, diff --git a/Source/cmGlobalVisualStudio10IA64Generator.h b/Source/cmGlobalVisualStudio10IA64Generator.h index 25436777d..ae12cc32d 100644 --- a/Source/cmGlobalVisualStudio10IA64Generator.h +++ b/Source/cmGlobalVisualStudio10IA64Generator.h @@ -33,8 +33,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - virtual void AddPlatformDefinitions(cmMakefile* mf); - virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); }; diff --git a/Source/cmGlobalVisualStudio10Win64Generator.cxx b/Source/cmGlobalVisualStudio10Win64Generator.cxx index d9db7317f..0352a46f5 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio10Win64Generator.cxx @@ -17,6 +17,7 @@ cmGlobalVisualStudio10Win64Generator::cmGlobalVisualStudio10Win64Generator() { this->ArchitectureId = "x64"; + this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64"; } //---------------------------------------------------------------------------- @@ -28,14 +29,6 @@ void cmGlobalVisualStudio10Win64Generator entry.Full = ""; } -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio10Win64Generator -::AddPlatformDefinitions(cmMakefile* mf) -{ - this->cmGlobalVisualStudio10Generator::AddPlatformDefinitions(mf); - mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); -} - //---------------------------------------------------------------------------- void cmGlobalVisualStudio10Win64Generator ::EnableLanguage(std::vector const& languages, diff --git a/Source/cmGlobalVisualStudio10Win64Generator.h b/Source/cmGlobalVisualStudio10Win64Generator.h index d95f770db..66d77a97a 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.h +++ b/Source/cmGlobalVisualStudio10Win64Generator.h @@ -33,8 +33,6 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - virtual void AddPlatformDefinitions(cmMakefile* mf); - virtual void EnableLanguage(std::vectorconst& languages, cmMakefile *, bool optional); }; diff --git a/Source/cmGlobalVisualStudio11Win64Generator.cxx b/Source/cmGlobalVisualStudio11Win64Generator.cxx index 5810b03dd..aca0a4e87 100644 --- a/Source/cmGlobalVisualStudio11Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio11Win64Generator.cxx @@ -17,6 +17,7 @@ cmGlobalVisualStudio11Win64Generator::cmGlobalVisualStudio11Win64Generator() { this->ArchitectureId = "x64"; + this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64"; } //---------------------------------------------------------------------------- @@ -27,11 +28,3 @@ void cmGlobalVisualStudio11Win64Generator entry.Brief = "Generates Visual Studio 11 Win64 project files."; entry.Full = ""; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio11Win64Generator -::AddPlatformDefinitions(cmMakefile* mf) -{ - this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf); - mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); -} diff --git a/Source/cmGlobalVisualStudio11Win64Generator.h b/Source/cmGlobalVisualStudio11Win64Generator.h index ff42281bd..bb33877e8 100644 --- a/Source/cmGlobalVisualStudio11Win64Generator.h +++ b/Source/cmGlobalVisualStudio11Win64Generator.h @@ -32,7 +32,5 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - virtual void AddPlatformDefinitions(cmMakefile* mf); }; #endif diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx index 448230304..a84e44c9b 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx @@ -20,6 +20,7 @@ cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator() { this->ArchitectureId = "x64"; + this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64"; } //---------------------------------------------------------------------------- @@ -30,11 +31,3 @@ void cmGlobalVisualStudio8Win64Generator entry.Brief = "Generates Visual Studio 8 2005 Win64 project files."; entry.Full = ""; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio8Win64Generator -::AddPlatformDefinitions(cmMakefile* mf) -{ - this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf); - mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); -} diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h index 883b74af2..4283c2869 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.h +++ b/Source/cmGlobalVisualStudio8Win64Generator.h @@ -38,11 +38,5 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - /** - * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. - */ - virtual void AddPlatformDefinitions(cmMakefile *); }; #endif diff --git a/Source/cmGlobalVisualStudio9IA64Generator.cxx b/Source/cmGlobalVisualStudio9IA64Generator.cxx index c56413b45..6b0ed600f 100644 --- a/Source/cmGlobalVisualStudio9IA64Generator.cxx +++ b/Source/cmGlobalVisualStudio9IA64Generator.cxx @@ -17,6 +17,7 @@ cmGlobalVisualStudio9IA64Generator::cmGlobalVisualStudio9IA64Generator() { this->ArchitectureId = "Itanium"; + this->AdditionalPlatformDefinition = "CMAKE_FORCE_IA64"; } //---------------------------------------------------------------------------- @@ -27,11 +28,3 @@ void cmGlobalVisualStudio9IA64Generator entry.Brief = "Generates Visual Studio 9 2008 Itanium project files."; entry.Full = ""; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio9IA64Generator -::AddPlatformDefinitions(cmMakefile* mf) -{ - cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf); - mf->AddDefinition("CMAKE_FORCE_IA64", "TRUE"); -} diff --git a/Source/cmGlobalVisualStudio9IA64Generator.h b/Source/cmGlobalVisualStudio9IA64Generator.h index ac962416b..0e5861ac4 100644 --- a/Source/cmGlobalVisualStudio9IA64Generator.h +++ b/Source/cmGlobalVisualStudio9IA64Generator.h @@ -38,11 +38,5 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - /** - * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. - */ - virtual void AddPlatformDefinitions(cmMakefile *); }; #endif diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx index f58cde5fc..37288b693 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx @@ -17,6 +17,7 @@ cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator() { this->ArchitectureId = "x64"; + this->AdditionalPlatformDefinition = "CMAKE_FORCE_WIN64"; } //---------------------------------------------------------------------------- @@ -27,11 +28,3 @@ void cmGlobalVisualStudio9Win64Generator entry.Brief = "Generates Visual Studio 9 2008 Win64 project files."; entry.Full = ""; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio9Win64Generator -::AddPlatformDefinitions(cmMakefile* mf) -{ - cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf); - mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); -} diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h index de7a1820b..713c402ab 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.h +++ b/Source/cmGlobalVisualStudio9Win64Generator.h @@ -38,11 +38,5 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - /** - * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. - */ - virtual void AddPlatformDefinitions(cmMakefile *); }; #endif diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index ea6757dea..a51735154 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -22,6 +22,7 @@ cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator() { this->ArchitectureId = "X86"; + this->AdditionalPlatformDefinition = NULL; } //---------------------------------------------------------------------------- @@ -493,6 +494,11 @@ void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf) { mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId); mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId); + + if(this->AdditionalPlatformDefinition) + { + mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE"); + } } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index cebf7d741..7258e313e 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -99,6 +99,7 @@ protected: typedef std::map UtilityDependsMap; UtilityDependsMap UtilityDepends; const char* ArchitectureId; + const char* AdditionalPlatformDefinition; private: void ComputeTargetObjects(cmGeneratorTarget* gt) const;