VS: Add ArchitectureId to VS 8 and 9 generators
Avoid duplicate architecture string literals.
This commit is contained in:
parent
4fec681fa7
commit
ef4394defa
|
@ -21,6 +21,7 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator()
|
|||
{
|
||||
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
|
||||
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
|
||||
this->ArchitectureId = "X86";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -55,8 +56,8 @@ void cmGlobalVisualStudio8Generator
|
|||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId);
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId);
|
||||
mf->AddDefinition("MSVC80", "1");
|
||||
}
|
||||
|
||||
|
|
|
@ -78,5 +78,7 @@ protected:
|
|||
virtual void WriteProjectConfigurations(std::ostream& fout,
|
||||
const char* name,
|
||||
bool partOfDefaultBuild);
|
||||
|
||||
const char* ArchitectureId;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
|
@ -47,6 +48,4 @@ void cmGlobalVisualStudio8Win64Generator
|
|||
{
|
||||
this->cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator()
|
|||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId);
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId);
|
||||
mf->AddDefinition("MSVC90", "1");
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator()
|
||||
{
|
||||
this->ArchitectureId = "x64";
|
||||
}
|
||||
|
||||
///! Create a local generator appropriate to this Global Generator
|
||||
|
@ -44,6 +45,4 @@ void cmGlobalVisualStudio9Win64Generator
|
|||
{
|
||||
cmGlobalVisualStudio9Generator::AddPlatformDefinitions(mf);
|
||||
mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
|
||||
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
|
||||
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue