Browse Source

VS: Move internal MasmEnabled member up to VS 7 generator

Move the member from cmGlobalVisualStudio10Generator to
cmGlobalVisualStudio7Generator to make it useful for earlier
versions of VS.  Set the member to true only starting with
cmGlobalVisualStudio8Generator since we will not implement
MASM support for versions less than VS 8.
Brad King 11 years ago
parent
commit
a43f44000d

+ 0 - 10
Source/cmGlobalVisualStudio10Generator.cxx

@@ -99,7 +99,6 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
     "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32);
     "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32);
   this->SystemIsWindowsPhone = false;
   this->SystemIsWindowsPhone = false;
   this->SystemIsWindowsStore = false;
   this->SystemIsWindowsStore = false;
-  this->MasmEnabled = false;
   this->MSBuildCommandInitialized = false;
   this->MSBuildCommandInitialized = false;
 }
 }
 
 
@@ -257,15 +256,6 @@ void cmGlobalVisualStudio10Generator
 ::EnableLanguage(std::vector<std::string>const &  lang,
 ::EnableLanguage(std::vector<std::string>const &  lang,
                  cmMakefile *mf, bool optional)
                  cmMakefile *mf, bool optional)
 {
 {
-  for(std::vector<std::string>::const_iterator it = lang.begin();
-      it != lang.end(); ++it)
-    {
-    if(*it == "ASM_MASM")
-      {
-      this->MasmEnabled = true;
-      }
-    }
-
   cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
   cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional);
 }
 }
 
 

+ 0 - 4
Source/cmGlobalVisualStudio10Generator.h

@@ -58,9 +58,6 @@ public:
   /** Is the installed VS an Express edition?  */
   /** Is the installed VS an Express edition?  */
   bool IsExpressEdition() const { return this->ExpressEdition; }
   bool IsExpressEdition() const { return this->ExpressEdition; }
 
 
-  /** Is the Microsoft Assembler enabled?  */
-  bool IsMasmEnabled() const { return this->MasmEnabled; }
-
   /** The toolset name for the target platform.  */
   /** The toolset name for the target platform.  */
   const char* GetPlatformToolset() const;
   const char* GetPlatformToolset() const;
 
 
@@ -123,7 +120,6 @@ protected:
   bool SystemIsWindowsPhone;
   bool SystemIsWindowsPhone;
   bool SystemIsWindowsStore;
   bool SystemIsWindowsStore;
   bool ExpressEdition;
   bool ExpressEdition;
-  bool MasmEnabled;
 
 
   bool UseFolderProperty();
   bool UseFolderProperty();
 
 

+ 1 - 0
Source/cmGlobalVisualStudio7Generator.cxx

@@ -23,6 +23,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
 {
 {
   this->IntelProjectVersion = 0;
   this->IntelProjectVersion = 0;
   this->DevEnvCommandInitialized = false;
   this->DevEnvCommandInitialized = false;
+  this->MasmEnabled = false;
 
 
   if (platformName.empty())
   if (platformName.empty())
     {
     {

+ 4 - 0
Source/cmGlobalVisualStudio7Generator.h

@@ -102,6 +102,9 @@ public:
 
 
   virtual void FindMakeProgram(cmMakefile*);
   virtual void FindMakeProgram(cmMakefile*);
 
 
+  /** Is the Microsoft Assembler enabled?  */
+  bool IsMasmEnabled() const { return this->MasmEnabled; }
+
   // Encoding for Visual Studio files
   // Encoding for Visual Studio files
   virtual std::string Encoding();
   virtual std::string Encoding();
 
 
@@ -173,6 +176,7 @@ protected:
   // There is one SLN file per project.
   // There is one SLN file per project.
   std::string CurrentProject;
   std::string CurrentProject;
   std::string PlatformName;
   std::string PlatformName;
+  bool MasmEnabled;
 
 
 private:
 private:
   char* IntelProjectVersion;
   char* IntelProjectVersion;

+ 8 - 0
Source/cmGlobalVisualStudio8Generator.cxx

@@ -136,6 +136,14 @@ void cmGlobalVisualStudio8Generator
 ::EnableLanguage(std::vector<std::string>const &  lang,
 ::EnableLanguage(std::vector<std::string>const &  lang,
                  cmMakefile *mf, bool optional)
                  cmMakefile *mf, bool optional)
 {
 {
+  for(std::vector<std::string>::const_iterator it = lang.begin();
+      it != lang.end(); ++it)
+    {
+    if(*it == "ASM_MASM")
+      {
+      this->MasmEnabled = true;
+      }
+    }
   this->AddPlatformDefinitions(mf);
   this->AddPlatformDefinitions(mf);
   cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional);
   cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional);
 }
 }