Merge topic 'vs10-system-hook'

e58f9753 VS: Add a hook to adapt to SystemName and SystemVersion
d0dd28fa VS: Save system name and version in global generator members
This commit is contained in:
Brad King 2014-07-29 08:52:24 -04:00 committed by CMake Topic Stage
commit 38065563b6
2 changed files with 15 additions and 0 deletions

View File

@ -128,6 +128,12 @@ cmGlobalVisualStudio10Generator::SetGeneratorToolset(std::string const& ts,
bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s,
cmMakefile* mf) cmMakefile* mf)
{ {
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->PlatformName == "Itanium" || this->PlatformName == "x64")
{ {
if(this->IsExpressEdition() && !this->Find64BitTools(mf)) if(this->IsExpressEdition() && !this->Find64BitTools(mf))
@ -139,6 +145,12 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s,
return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf); return this->cmGlobalVisualStudio8Generator::SetSystemName(s, mf);
} }
//----------------------------------------------------------------------------
bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*)
{
return true;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalVisualStudio10Generator void cmGlobalVisualStudio10Generator
::AddVSPlatformToolsetDefinition(cmMakefile* mf) const ::AddVSPlatformToolsetDefinition(cmMakefile* mf) const

View File

@ -92,6 +92,7 @@ public:
protected: protected:
virtual void Generate(); virtual void Generate();
virtual bool InitializeSystem(cmMakefile* mf);
virtual const char* GetIDEVersion() { return "10.0"; } virtual const char* GetIDEVersion() { return "10.0"; }
@ -99,6 +100,8 @@ protected:
std::string GeneratorToolset; std::string GeneratorToolset;
std::string DefaultPlatformToolset; std::string DefaultPlatformToolset;
std::string SystemName;
std::string SystemVersion;
bool ExpressEdition; bool ExpressEdition;
bool MasmEnabled; bool MasmEnabled;