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.
This commit is contained in:
Brad King 2014-08-07 12:58:25 -04:00
parent df3b007d7f
commit a43f44000d
5 changed files with 13 additions and 14 deletions

View File

@ -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::vector<std::string>const & lang,
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);
}

View File

@ -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();

View File

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

View File

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

View File

@ -136,6 +136,14 @@ void cmGlobalVisualStudio8Generator
::EnableLanguage(std::vector<std::string>const & lang,
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);
cmGlobalVisualStudio7Generator::EnableLanguage(lang, mf, optional);
}