From 8b62080c9db6a15649bd1673179076c096e26bec Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Mon, 19 Nov 2012 18:11:17 +0100 Subject: VS: Remove EnableLanguage from platform-specific generators Move the logic into the base class to remove duplicated code. --- Source/cmGlobalVisualStudio10Generator.cxx | 8 ++++++++ Source/cmGlobalVisualStudio10IA64Generator.cxx | 13 ------------- Source/cmGlobalVisualStudio10IA64Generator.h | 3 --- Source/cmGlobalVisualStudio10Win64Generator.cxx | 13 ------------- Source/cmGlobalVisualStudio10Win64Generator.h | 3 --- 5 files changed, 8 insertions(+), 32 deletions(-) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index b885223..db363bf 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -100,6 +100,14 @@ void cmGlobalVisualStudio10Generator ::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { + if(!strcmp(this->ArchitectureId, "Itanium") || + !strcmp(this->ArchitectureId, "x64")) + { + if(this->IsExpressEdition() && !this->Find64BitTools(mf)) + { + return; + } + } cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); } diff --git a/Source/cmGlobalVisualStudio10IA64Generator.cxx b/Source/cmGlobalVisualStudio10IA64Generator.cxx index 9a03d1b..08a2e7a 100644 --- a/Source/cmGlobalVisualStudio10IA64Generator.cxx +++ b/Source/cmGlobalVisualStudio10IA64Generator.cxx @@ -28,16 +28,3 @@ void cmGlobalVisualStudio10IA64Generator entry.Brief = "Generates Visual Studio 10 Itanium project files."; entry.Full = ""; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio10IA64Generator -::EnableLanguage(std::vector const& languages, - cmMakefile* mf, bool optional) -{ - if(this->IsExpressEdition() && !this->Find64BitTools(mf)) - { - return; - } - this->cmGlobalVisualStudio10Generator - ::EnableLanguage(languages, mf, optional); -} diff --git a/Source/cmGlobalVisualStudio10IA64Generator.h b/Source/cmGlobalVisualStudio10IA64Generator.h index 3c3325e..2bf7659 100644 --- a/Source/cmGlobalVisualStudio10IA64Generator.h +++ b/Source/cmGlobalVisualStudio10IA64Generator.h @@ -30,8 +30,5 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - virtual void EnableLanguage(std::vectorconst& languages, - cmMakefile *, bool optional); }; #endif diff --git a/Source/cmGlobalVisualStudio10Win64Generator.cxx b/Source/cmGlobalVisualStudio10Win64Generator.cxx index 0352a46..93b5a64 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio10Win64Generator.cxx @@ -28,16 +28,3 @@ void cmGlobalVisualStudio10Win64Generator entry.Brief = "Generates Visual Studio 10 Win64 project files."; entry.Full = ""; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio10Win64Generator -::EnableLanguage(std::vector const& languages, - cmMakefile* mf, bool optional) -{ - if(this->IsExpressEdition() && !this->Find64BitTools(mf)) - { - return; - } - this->cmGlobalVisualStudio10Generator - ::EnableLanguage(languages, mf, optional); -} diff --git a/Source/cmGlobalVisualStudio10Win64Generator.h b/Source/cmGlobalVisualStudio10Win64Generator.h index 30b2164..59a34f4 100644 --- a/Source/cmGlobalVisualStudio10Win64Generator.h +++ b/Source/cmGlobalVisualStudio10Win64Generator.h @@ -30,8 +30,5 @@ public: /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); - - virtual void EnableLanguage(std::vectorconst& languages, - cmMakefile *, bool optional); }; #endif -- cgit v0.12