From e58f97531aa6e2a124540f38b5acd18fd989cf3b Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 28 Jul 2014 15:37:15 -0400 Subject: 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. --- Source/cmGlobalVisualStudio10Generator.cxx | 10 ++++++++++ Source/cmGlobalVisualStudio10Generator.h | 1 + 2 files changed, 11 insertions(+) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index ad74537..32049b3 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -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)) @@ -142,6 +146,12 @@ bool cmGlobalVisualStudio10Generator::SetSystemName(std::string const& s, } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile*) +{ + return true; +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio10Generator ::AddVSPlatformToolsetDefinition(cmMakefile* mf) const { diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index dfdb649..4d7ff80 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -92,6 +92,7 @@ public: protected: virtual void Generate(); + virtual bool InitializeSystem(cmMakefile* mf); virtual const char* GetIDEVersion() { return "10.0"; } -- cgit v0.12