VS: Allow setting the name of the target platform

Since the name for a target platform is independent of its cpu
architecture an additional option is required to set it correctly.
This commit is contained in:
Patrick Gansterer 2012-11-20 13:16:36 +01:00 committed by Brad King
parent 6fe4fcba78
commit 038df9e49e
3 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,7 @@ public:
cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator( cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator(
name, parser.GetArchitectureFamily(), NULL); name, parser.GetArchitectureFamily(), NULL);
ret->PlatformName = p;
ret->WindowsCEVersion = parser.GetOSVersion(); ret->WindowsCEVersion = parser.GetOSVersion();
return ret; return ret;
} }
@ -114,6 +115,10 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const char* cmGlobalVisualStudio8Generator::GetPlatformName() const const char* cmGlobalVisualStudio8Generator::GetPlatformName() const
{ {
if (!this->PlatformName.empty())
{
return this->PlatformName.c_str();
}
if (this->ArchitectureId == "X86") if (this->ArchitectureId == "X86")
{ {
return "Win32"; return "Win32";

View File

@ -87,6 +87,7 @@ protected:
const char* path, cmTarget &t); const char* path, cmTarget &t);
std::string Name; std::string Name;
std::string PlatformName;
std::string WindowsCEVersion; std::string WindowsCEVersion;
private: private:

View File

@ -63,6 +63,7 @@ public:
cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator( cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator(
name, parser.GetArchitectureFamily(), NULL); name, parser.GetArchitectureFamily(), NULL);
ret->PlatformName = p;
ret->WindowsCEVersion = parser.GetOSVersion(); ret->WindowsCEVersion = parser.GetOSVersion();
return ret; return ret;
} }