Selaa lähdekoodia

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.
Patrick Gansterer 13 vuotta sitten
vanhempi
sitoutus
038df9e49e

+ 5 - 0
Source/cmGlobalVisualStudio8Generator.cxx

@@ -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";

+ 1 - 0
Source/cmGlobalVisualStudio8Generator.h

@@ -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:

+ 1 - 0
Source/cmGlobalVisualStudio9Generator.cxx

@@ -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;
   }
   }