VS: Add a hook to adapt to SystemName and SystemVersion

Add a virtual cmGlobalVisualStudio10Generator::InitializeSystem method
called from SetSystemName once the SystemName and SystemVersion members
have been populated.  This will give VS version-specific generators a
chance to recognize and adapt to the target system.
This commit is contained in:
Brad King 2014-07-28 15:37:15 -04:00
parent d0dd28fa92
commit e58f97531a
2 changed files with 11 additions and 0 deletions

View File

@ -130,6 +130,10 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s,
{
this->SystemName = s;
this->SystemVersion = mf->GetSafeDefinition("CMAKE_SYSTEM_VERSION");
if(!this->InitializeSystem(mf))
{
return false;
}
if(this->PlatformName == "Itanium" || this->PlatformName == "x64")
{
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
@ -141,6 +145,12 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s,
return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf);
}
//----------------------------------------------------------------------------
bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*)
{
return true;
}
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Generator
::AddVSPlatformToolsetDefinition(cmMakefile* mf) const

View File

@ -92,6 +92,7 @@ public:
protected:
virtual void Generate();
virtual bool InitializeSystem(cmMakefile* mf);
virtual const char* GetIDEVersion() { return "10.0"; }