From a43f44000d12c1357eeed04e5a02d11236730dfa Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 7 Aug 2014 12:58:25 -0400 Subject: [PATCH] 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. --- Source/cmGlobalVisualStudio10Generator.cxx | 10 ---------- Source/cmGlobalVisualStudio10Generator.h | 4 ---- Source/cmGlobalVisualStudio7Generator.cxx | 1 + Source/cmGlobalVisualStudio7Generator.h | 4 ++++ Source/cmGlobalVisualStudio8Generator.cxx | 8 ++++++++ 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index c708a0824..19aa52c88 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -99,7 +99,6 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( "ProductDir", vc10Express, cmSystemTools::KeyWOW64_32); this->SystemIsWindowsPhone = false; this->SystemIsWindowsStore = false; - this->MasmEnabled = false; this->MSBuildCommandInitialized = false; } @@ -257,15 +256,6 @@ void cmGlobalVisualStudio10Generator ::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { - for(std::vector::const_iterator it = lang.begin(); - it != lang.end(); ++it) - { - if(*it == "ASM_MASM") - { - this->MasmEnabled = true; - } - } - cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 6245b285f..11fa95458 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -58,9 +58,6 @@ public: /** Is the installed VS an Express edition? */ bool IsExpressEdition() const { return this->ExpressEdition; } - /** Is the Microsoft Assembler enabled? */ - bool IsMasmEnabled() const { return this->MasmEnabled; } - /** The toolset name for the target platform. */ const char* GetPlatformToolset() const; @@ -123,7 +120,6 @@ protected: bool SystemIsWindowsPhone; bool SystemIsWindowsStore; bool ExpressEdition; - bool MasmEnabled; bool UseFolderProperty(); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 3d79357ec..e312ff18c 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -23,6 +23,7 @@ cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator( { this->IntelProjectVersion = 0; this->DevEnvCommandInitialized = false; + this->MasmEnabled = false; if (platformName.empty()) { diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 390b97c13..7e3ed23c8 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -102,6 +102,9 @@ public: virtual void FindMakeProgram(cmMakefile*); + /** Is the Microsoft Assembler enabled? */ + bool IsMasmEnabled() const { return this->MasmEnabled; } + // Encoding for Visual Studio files virtual std::string Encoding(); @@ -173,6 +176,7 @@ protected: // There is one SLN file per project. std::string CurrentProject; std::string PlatformName; + bool MasmEnabled; private: char* IntelProjectVersion; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 6bfef68f8..c91730f21 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -136,6 +136,14 @@ void cmGlobalVisualStudio8Generator ::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { + for(std::vector::const_iterator it = lang.begin(); + it != lang.end(); ++it) + { + if(*it == "ASM_MASM") + { + this->MasmEnabled = true; + } + } this->AddPlatformDefinitions(mf); cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional); }