summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake8
-rw-r--r--Modules/CompilerId/VS-10.vcxproj.in14
-rw-r--r--Modules/CompilerId/VS-7.vcproj.in4
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx6
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio11Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio12Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio71Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx23
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h4
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx11
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx7
-rw-r--r--Source/cmGlobalVisualStudio9Generator.h2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx4
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h1
19 files changed, 45 insertions, 60 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index dc70dc6..9f2c797 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -109,7 +109,7 @@ Id flags: ${testflags}
# Compile the compiler identification source.
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
set(vs_version ${CMAKE_MATCH_1})
- set(id_arch ${CMAKE_VS_PLATFORM_NAME})
+ set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_cl cl.exe)
if(NOT "${vs_version}" VERSION_LESS 10)
@@ -123,8 +123,8 @@ Id flags: ${testflags}
set(v 6)
set(ext dsp)
endif()
- if("${id_arch}" STREQUAL "Itanium")
- set(id_arch ia64)
+ if("${id_platform}" STREQUAL "Itanium")
+ set(id_platform ia64)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET)
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
@@ -138,7 +138,7 @@ Id flags: ${testflags}
set(id_subsystem 1)
endif()
if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]")
- set(build /p:Configuration=Debug /p:Platform=@id_arch@ /p:VisualStudioVersion=${vs_version}.0)
+ set(build /p:Configuration=Debug /p:Platform=@id_platform@ /p:VisualStudioVersion=${vs_version}.0)
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
set(build /make)
else()
diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in
index 55b5cdf..1a7a539 100644
--- a/Modules/CompilerId/VS-10.vcxproj.in
+++ b/Modules/CompilerId/VS-10.vcxproj.in
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|@id_arch@">
+ <ProjectConfiguration Include="Debug|@id_platform@">
<Configuration>Debug</Configuration>
- <Platform>@id_arch@</Platform>
+ <Platform>@id_platform@</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
@@ -12,7 +12,7 @@
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@id_toolset@
<CharacterSet>MultiByte</CharacterSet>
@@ -20,11 +20,11 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">.\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">.\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">false</LinkIncremental>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/Modules/CompilerId/VS-7.vcproj.in b/Modules/CompilerId/VS-7.vcproj.in
index fa48cad..9e3c3c3 100644
--- a/Modules/CompilerId/VS-7.vcproj.in
+++ b/Modules/CompilerId/VS-7.vcproj.in
@@ -10,12 +10,12 @@
>
<Platforms>
<Platform
- Name="@id_arch@"
+ Name="@id_platform@"
/>
</Platforms>
<Configurations>
<Configuration
- Name="Debug|@id_arch@"
+ Name="Debug|@id_platform@"
OutputDirectory="."
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 0837f99..4907c23 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -69,9 +69,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
//----------------------------------------------------------------------------
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
- const char* name, const char* architectureId,
+ const char* name, const char* platformName,
const char* additionalPlatformDefinition)
- : cmGlobalVisualStudio8Generator(name, architectureId,
+ : cmGlobalVisualStudio8Generator(name, platformName,
additionalPlatformDefinition)
{
this->FindMakeProgramFile = "CMakeVS10FindMake.cmake";
@@ -161,7 +161,7 @@ void cmGlobalVisualStudio10Generator
::EnableLanguage(std::vector<std::string>const & lang,
cmMakefile *mf, bool optional)
{
- if(this->ArchitectureId == "Itanium" || this->ArchitectureId == "x64")
+ if(this->PlatformName == "Itanium" || this->PlatformName == "x64")
{
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
{
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index dbe6044..21682f8 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -25,7 +25,7 @@ class cmGlobalVisualStudio10Generator :
{
public:
cmGlobalVisualStudio10Generator(const char* name,
- const char* architectureId, const char* additionalPlatformDefinition);
+ const char* platformName, const char* additionalPlatformDefinition);
static cmGlobalGeneratorFactory* NewFactory();
virtual bool SetGeneratorToolset(std::string const& ts);
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index 624d01d..0986277 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -64,9 +64,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
//----------------------------------------------------------------------------
cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator(
- const char* name, const char* architectureId,
+ const char* name, const char* platformName,
const char* additionalPlatformDefinition)
- : cmGlobalVisualStudio10Generator(name, architectureId,
+ : cmGlobalVisualStudio10Generator(name, platformName,
additionalPlatformDefinition)
{
this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h
index 174f1cc..b61366a 100644
--- a/Source/cmGlobalVisualStudio11Generator.h
+++ b/Source/cmGlobalVisualStudio11Generator.h
@@ -21,7 +21,7 @@ class cmGlobalVisualStudio11Generator:
{
public:
cmGlobalVisualStudio11Generator(const char* name,
- const char* architectureId, const char* additionalPlatformDefinition);
+ const char* platformName, const char* additionalPlatformDefinition);
static cmGlobalGeneratorFactory* NewFactory();
virtual void WriteSLNHeader(std::ostream& fout);
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index d77b84d..6669f94 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -64,9 +64,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
//----------------------------------------------------------------------------
cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator(
- const char* name, const char* architectureId,
+ const char* name, const char* platformName,
const char* additionalPlatformDefinition)
- : cmGlobalVisualStudio11Generator(name, architectureId,
+ : cmGlobalVisualStudio11Generator(name, platformName,
additionalPlatformDefinition)
{
this->FindMakeProgramFile = "CMakeVS12FindMake.cmake";
diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h
index 5844ee0..2a2133b 100644
--- a/Source/cmGlobalVisualStudio12Generator.h
+++ b/Source/cmGlobalVisualStudio12Generator.h
@@ -21,7 +21,7 @@ class cmGlobalVisualStudio12Generator:
{
public:
cmGlobalVisualStudio12Generator(const char* name,
- const char* architectureId, const char* additionalPlatformDefinition);
+ const char* platformName, const char* additionalPlatformDefinition);
static cmGlobalGeneratorFactory* NewFactory();
virtual void WriteSLNHeader(std::ostream& fout);
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 24ca0b1..51efc46 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -16,7 +16,8 @@
#include "cmake.h"
//----------------------------------------------------------------------------
-cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator()
+cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator(
+ const char* platformName) : cmGlobalVisualStudio7Generator(platformName)
{
this->FindMakeProgramFile = "CMakeVS71FindMake.cmake";
this->ProjectConfigurationSectionName = "ProjectConfiguration";
diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h
index 6d91f97..e136db7 100644
--- a/Source/cmGlobalVisualStudio71Generator.h
+++ b/Source/cmGlobalVisualStudio71Generator.h
@@ -23,7 +23,7 @@
class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator
{
public:
- cmGlobalVisualStudio71Generator();
+ cmGlobalVisualStudio71Generator(const char* platformName = NULL);
static cmGlobalGeneratorFactory* NewFactory() {
return new cmGlobalGeneratorSimpleFactory
<cmGlobalVisualStudio71Generator>(); }
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 812659e..b475665 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -17,9 +17,16 @@
#include "cmMakefile.h"
#include "cmake.h"
-cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator()
+cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
+ const char* platformName)
{
this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
+
+ if (!platformName)
+ {
+ platformName = "Win32";
+ }
+ this->PlatformName = platformName;
}
@@ -151,20 +158,6 @@ void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName());
}
-//----------------------------------------------------------------------------
-const char* cmGlobalVisualStudio7Generator::GetPlatformName() const
-{
- if (!this->PlatformName.empty())
- {
- return this->PlatformName.c_str();
- }
- if (this->ArchitectureId == "X86")
- {
- return "Win32";
- }
- return this->ArchitectureId.c_str();
-}
-
void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
{
// process the configurations
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index dfa8547..4d22cff 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -26,7 +26,7 @@ struct cmIDEFlagTable;
class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator
{
public:
- cmGlobalVisualStudio7Generator();
+ cmGlobalVisualStudio7Generator(const char* platformName = NULL);
static cmGlobalGeneratorFactory* NewFactory() {
return new cmGlobalGeneratorSimpleFactory
<cmGlobalVisualStudio7Generator>(); }
@@ -37,7 +37,7 @@ public:
static const char* GetActualName() {return "Visual Studio 7";}
///! Get the name for the platform.
- const char* GetPlatformName() const;
+ const char* GetPlatformName() const { return this->PlatformName.c_str(); }
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 558b6b6..e4244e0 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -57,8 +57,7 @@ public:
}
cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator(
- name, parser.GetArchitectureFamily(), NULL);
- ret->PlatformName = p;
+ name, p, NULL);
ret->WindowsCEVersion = parser.GetOSVersion();
return ret;
}
@@ -96,16 +95,14 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
//----------------------------------------------------------------------------
cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
- const char* name, const char* architectureId,
+ const char* name, const char* platformName,
const char* additionalPlatformDefinition)
+ : cmGlobalVisualStudio71Generator(platformName)
{
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
this->Name = name;
- if (architectureId)
- {
- this->ArchitectureId = architectureId;
- }
+
if (additionalPlatformDefinition)
{
this->AdditionalPlatformDefinition = additionalPlatformDefinition;
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index 262acad..d181742 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -24,7 +24,7 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
{
public:
cmGlobalVisualStudio8Generator(const char* name,
- const char* architectureId, const char* additionalPlatformDefinition);
+ const char* platformName, const char* additionalPlatformDefinition);
static cmGlobalGeneratorFactory* NewFactory();
///! Get the name for the generator.
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index 2082384..fba6ed1 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -62,8 +62,7 @@ public:
}
cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator(
- name, parser.GetArchitectureFamily(), NULL);
- ret->PlatformName = p;
+ name, p, NULL);
ret->WindowsCEVersion = parser.GetOSVersion();
return ret;
}
@@ -102,9 +101,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
//----------------------------------------------------------------------------
cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator(
- const char* name, const char* architectureId,
+ const char* name, const char* platformName,
const char* additionalPlatformDefinition)
- : cmGlobalVisualStudio8Generator(name, architectureId,
+ : cmGlobalVisualStudio8Generator(name, platformName,
additionalPlatformDefinition)
{
this->FindMakeProgramFile = "CMakeVS9FindMake.cmake";
diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h
index 1310a93..202aa8d 100644
--- a/Source/cmGlobalVisualStudio9Generator.h
+++ b/Source/cmGlobalVisualStudio9Generator.h
@@ -25,7 +25,7 @@ class cmGlobalVisualStudio9Generator :
{
public:
cmGlobalVisualStudio9Generator(const char* name,
- const char* architectureId, const char* additionalPlatformDefinition);
+ const char* platformName, const char* additionalPlatformDefinition);
static cmGlobalGeneratorFactory* NewFactory();
///! create the correct local generator
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index f4be0ce..5931016 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -21,7 +21,6 @@
//----------------------------------------------------------------------------
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator()
{
- this->ArchitectureId = "X86";
this->AdditionalPlatformDefinition = NULL;
}
@@ -499,9 +498,6 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
//----------------------------------------------------------------------------
void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf)
{
- mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", this->ArchitectureId.c_str());
- mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", this->ArchitectureId.c_str());
-
if(this->AdditionalPlatformDefinition)
{
mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE");
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 9d81170..b665158 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -104,7 +104,6 @@ protected:
std::string GetUtilityDepend(cmTarget* target);
typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
UtilityDependsMap UtilityDepends;
- std::string ArchitectureId;
const char* AdditionalPlatformDefinition;
private: