diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index c218c97ec..d9920366b 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -144,8 +144,7 @@ void cmGlobalVisualStudio10Generator ::EnableLanguage(std::vectorconst & lang, cmMakefile *mf, bool optional) { - if(!strcmp(this->ArchitectureId, "Itanium") || - !strcmp(this->ArchitectureId, "x64")) + if(this->ArchitectureId == "Itanium" || this->ArchitectureId == "x64") { if(this->IsExpressEdition() && !this->Find64BitTools(mf)) { diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 8ab97b5b8..be1bedc76 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -79,11 +79,11 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator( //---------------------------------------------------------------------------- const char* cmGlobalVisualStudio8Generator::GetPlatformName() const { - if (!strcmp(this->ArchitectureId, "X86")) + if (this->ArchitectureId == "X86") { return "Win32"; } - return this->ArchitectureId; + return this->ArchitectureId.c_str(); } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 67d6f8075..808664d44 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -499,8 +499,8 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target) //---------------------------------------------------------------------------- void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf) { - mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId); - mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId); + mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId.c_str()); + mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId.c_str()); if(this->AdditionalPlatformDefinition) { diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 65ba24fcd..f9715ab9f 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -101,7 +101,7 @@ protected: std::string GetUtilityDepend(cmTarget* target); typedef std::map UtilityDependsMap; UtilityDependsMap UtilityDepends; - const char* ArchitectureId; + std::string ArchitectureId; const char* AdditionalPlatformDefinition; private: