summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2012-11-20 12:16:36 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-27 13:31:18 (GMT)
commit038df9e49e6fcb54d6f6a1bcfb09f6a0e5ec0c2e (patch)
tree3ecef2f6d375a8966406742e666090a2b230823d
parent6fe4fcba787e4e27a4863faa28aa41ae11026d6b (diff)
downloadCMake-038df9e49e6fcb54d6f6a1bcfb09f6a0e5ec0c2e.zip
CMake-038df9e49e6fcb54d6f6a1bcfb09f6a0e5ec0c2e.tar.gz
CMake-038df9e49e6fcb54d6f6a1bcfb09f6a0e5ec0c2e.tar.bz2
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.
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx5
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h1
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx1
3 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 39b31a0..a482d46 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -58,6 +58,7 @@ public:
cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator(
name, parser.GetArchitectureFamily(), NULL);
+ ret->PlatformName = p;
ret->WindowsCEVersion = parser.GetOSVersion();
return ret;
}
@@ -114,6 +115,10 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
//----------------------------------------------------------------------------
const char* cmGlobalVisualStudio8Generator::GetPlatformName() const
{
+ if (!this->PlatformName.empty())
+ {
+ return this->PlatformName.c_str();
+ }
if (this->ArchitectureId == "X86")
{
return "Win32";
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index 08674cd..4dd2b4b 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -87,6 +87,7 @@ protected:
const char* path, cmTarget &t);
std::string Name;
+ std::string PlatformName;
std::string WindowsCEVersion;
private:
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index dbe093e..2082384 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -63,6 +63,7 @@ public:
cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator(
name, parser.GetArchitectureFamily(), NULL);
+ ret->PlatformName = p;
ret->WindowsCEVersion = parser.GetOSVersion();
return ret;
}