Преглед на файлове

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 години
родител
ревизия
038df9e49e
променени са 3 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 5 0
      Source/cmGlobalVisualStudio8Generator.cxx
  2. 1 0
      Source/cmGlobalVisualStudio8Generator.h
  3. 1 0
      Source/cmGlobalVisualStudio9Generator.cxx

+ 5 - 0
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";

+ 1 - 0
Source/cmGlobalVisualStudio8Generator.h

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

+ 1 - 0
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;
   }