VS: Remove EnableLanguage from platform-specific generators

Move the logic into the base class to remove duplicated code.
This commit is contained in:
Patrick Gansterer 2012-11-19 18:11:17 +01:00 committed by Brad King
parent 5bdf01184b
commit 8b62080c9d
5 changed files with 8 additions and 32 deletions

View File

@ -100,6 +100,14 @@ void cmGlobalVisualStudio10Generator
::EnableLanguage(std::vector<std::string>const & 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);
}

View File

@ -28,16 +28,3 @@ void cmGlobalVisualStudio10IA64Generator
entry.Brief = "Generates Visual Studio 10 Itanium project files.";
entry.Full = "";
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10IA64Generator
::EnableLanguage(std::vector<std::string> const& languages,
cmMakefile* mf, bool optional)
{
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
{
return;
}
this->cmGlobalVisualStudio10Generator
::EnableLanguage(languages, mf, optional);
}

View File

@ -30,8 +30,5 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
};
#endif

View File

@ -28,16 +28,3 @@ void cmGlobalVisualStudio10Win64Generator
entry.Brief = "Generates Visual Studio 10 Win64 project files.";
entry.Full = "";
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Win64Generator
::EnableLanguage(std::vector<std::string> const& languages,
cmMakefile* mf, bool optional)
{
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
{
return;
}
this->cmGlobalVisualStudio10Generator
::EnableLanguage(languages, mf, optional);
}

View File

@ -30,8 +30,5 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);
};
#endif