Merge topic 'vs-cleanup'
c90151b VS: Unify how the name of the generator is specified 3873d29 Fix detection of WinCE SDKs with 64bit verion of CMake 40a4302 VS12: Remove duplicated overload of UseFolderProperty() b02f09d VS: Replace ArchitectureId with PlatformName 4b15dc8 VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too 60e568c VS10: Do not set the TargetMachine when detecting the compiler dfbfe6f VS6: Hardcode id_machine_6 for compiler detection
This commit is contained in:
commit
dba225db33
@ -109,12 +109,9 @@ Id flags: ${testflags}
|
|||||||
# Compile the compiler identification source.
|
# Compile the compiler identification source.
|
||||||
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
|
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
|
||||||
set(vs_version ${CMAKE_MATCH_1})
|
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_lang "${lang}")
|
||||||
set(id_cl cl.exe)
|
set(id_cl cl.exe)
|
||||||
if(NOT id_arch)
|
|
||||||
set(id_arch Win32)
|
|
||||||
endif()
|
|
||||||
if(NOT "${vs_version}" VERSION_LESS 10)
|
if(NOT "${vs_version}" VERSION_LESS 10)
|
||||||
set(v 10)
|
set(v 10)
|
||||||
set(ext vcxproj)
|
set(ext vcxproj)
|
||||||
@ -126,16 +123,8 @@ Id flags: ${testflags}
|
|||||||
set(v 6)
|
set(v 6)
|
||||||
set(ext dsp)
|
set(ext dsp)
|
||||||
endif()
|
endif()
|
||||||
if("${id_arch}" STREQUAL "x64")
|
if("${id_platform}" STREQUAL "Itanium")
|
||||||
set(id_machine_10 MachineX64)
|
set(id_platform ia64)
|
||||||
elseif("${id_arch}" STREQUAL "Itanium")
|
|
||||||
set(id_machine_10 MachineIA64)
|
|
||||||
set(id_arch ia64)
|
|
||||||
elseif("${id_arch}" STREQUAL "ARM")
|
|
||||||
set(id_machine_10 MachineARM)
|
|
||||||
else()
|
|
||||||
set(id_machine_6 x86)
|
|
||||||
set(id_machine_10 MachineX86)
|
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_VS_PLATFORM_TOOLSET)
|
if(CMAKE_VS_PLATFORM_TOOLSET)
|
||||||
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
|
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
|
||||||
@ -149,7 +138,7 @@ Id flags: ${testflags}
|
|||||||
set(id_subsystem 1)
|
set(id_subsystem 1)
|
||||||
endif()
|
endif()
|
||||||
if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]")
|
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]")
|
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
|
||||||
set(build /make)
|
set(build /make)
|
||||||
else()
|
else()
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@id_arch@">
|
<ProjectConfiguration Include="Debug|@id_platform@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>@id_arch@</Platform>
|
<Platform>@id_platform@</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<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>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
@id_toolset@
|
@id_toolset@
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@ -20,11 +20,11 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">.\</OutDir>
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">.\</OutDir>
|
||||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">$(Configuration)\</IntDir>
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">$(Configuration)\</IntDir>
|
||||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">false</LinkIncremental>
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">false</LinkIncremental>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_arch@'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
@ -40,7 +40,6 @@
|
|||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<TargetMachine>@id_machine_10@</TargetMachine>
|
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>for %%i in (@id_cl@) do %40echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i</Command>
|
<Command>for %%i in (@id_cl@) do %40echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i</Command>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="CompilerId@id_lang@" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="CompilerId@id_lang@" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
|
||||||
# TARGTYPE "Win32 (@id_machine_6@) Application" 0x0101
|
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||||
|
|
||||||
CFG=CompilerId@id_lang@ - Win32 Debug
|
CFG=CompilerId@id_lang@ - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
@ -16,7 +16,7 @@ CFG=CompilerId@id_lang@ - Win32 Debug
|
|||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (@id_machine_6@) Application")
|
!MESSAGE "CompilerId@id_lang@ - Win32 Debug" (based on "Win32 (x86) Application")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
@ -29,7 +29,7 @@ CPP=cl.exe
|
|||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD CPP /nologo /MDd /c
|
# ADD CPP /nologo /MDd /c
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:@id_machine_6@ /out:"CompilerId@id_lang@.exe" /IGNORE:4089
|
# ADD LINK32 /nologo /version:0.0 /subsystem:console /machine:x86 /out:"CompilerId@id_lang@.exe" /IGNORE:4089
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Cmds=for %%i in (@id_cl@) do @echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i
|
PostBuild_Cmds=for %%i in (@id_cl@) do @echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
Name="@id_arch@"
|
Name="@id_platform@"
|
||||||
/>
|
/>
|
||||||
</Platforms>
|
</Platforms>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|@id_arch@"
|
Name="Debug|@id_platform@"
|
||||||
OutputDirectory="."
|
OutputDirectory="."
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
|
@ -30,17 +30,17 @@ public:
|
|||||||
if(!strcmp(name, vs10Win32generatorName))
|
if(!strcmp(name, vs10Win32generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio10Generator(
|
return new cmGlobalVisualStudio10Generator(
|
||||||
vs10Win32generatorName, NULL, NULL);
|
name, NULL, NULL);
|
||||||
}
|
}
|
||||||
if(!strcmp(name, vs10Win64generatorName))
|
if(!strcmp(name, vs10Win64generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio10Generator(
|
return new cmGlobalVisualStudio10Generator(
|
||||||
vs10Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
name, "x64", "CMAKE_FORCE_WIN64");
|
||||||
}
|
}
|
||||||
if(!strcmp(name, vs10IA64generatorName))
|
if(!strcmp(name, vs10IA64generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio10Generator(
|
return new cmGlobalVisualStudio10Generator(
|
||||||
vs10IA64generatorName, "Itanium", "CMAKE_FORCE_IA64");
|
name, "Itanium", "CMAKE_FORCE_IA64");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -69,9 +69,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
|
cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
|
||||||
const char* name, const char* architectureId,
|
const char* name, const char* platformName,
|
||||||
const char* additionalPlatformDefinition)
|
const char* additionalPlatformDefinition)
|
||||||
: cmGlobalVisualStudio8Generator(name, architectureId,
|
: cmGlobalVisualStudio8Generator(name, platformName,
|
||||||
additionalPlatformDefinition)
|
additionalPlatformDefinition)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS10FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS10FindMake.cmake";
|
||||||
@ -161,7 +161,7 @@ void cmGlobalVisualStudio10Generator
|
|||||||
::EnableLanguage(std::vector<std::string>const & lang,
|
::EnableLanguage(std::vector<std::string>const & lang,
|
||||||
cmMakefile *mf, bool optional)
|
cmMakefile *mf, bool optional)
|
||||||
{
|
{
|
||||||
if(this->ArchitectureId == "Itanium" || this->ArchitectureId == "x64")
|
if(this->PlatformName == "Itanium" || this->PlatformName == "x64")
|
||||||
{
|
{
|
||||||
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
|
if(this->IsExpressEdition() && !this->Find64BitTools(mf))
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ class cmGlobalVisualStudio10Generator :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio10Generator(const char* name,
|
cmGlobalVisualStudio10Generator(const char* name,
|
||||||
const char* architectureId, const char* additionalPlatformDefinition);
|
const char* platformName, const char* additionalPlatformDefinition);
|
||||||
static cmGlobalGeneratorFactory* NewFactory();
|
static cmGlobalGeneratorFactory* NewFactory();
|
||||||
|
|
||||||
virtual bool SetGeneratorToolset(std::string const& ts);
|
virtual bool SetGeneratorToolset(std::string const& ts);
|
||||||
|
@ -25,17 +25,17 @@ public:
|
|||||||
if(!strcmp(name, vs11Win32generatorName))
|
if(!strcmp(name, vs11Win32generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio11Generator(
|
return new cmGlobalVisualStudio11Generator(
|
||||||
vs11Win32generatorName, NULL, NULL);
|
name, NULL, NULL);
|
||||||
}
|
}
|
||||||
if(!strcmp(name, vs11Win64generatorName))
|
if(!strcmp(name, vs11Win64generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio11Generator(
|
return new cmGlobalVisualStudio11Generator(
|
||||||
vs11Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
name, "x64", "CMAKE_FORCE_WIN64");
|
||||||
}
|
}
|
||||||
if(!strcmp(name, vs11ARMgeneratorName))
|
if(!strcmp(name, vs11ARMgeneratorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio11Generator(
|
return new cmGlobalVisualStudio11Generator(
|
||||||
vs11ARMgeneratorName, "ARM", NULL);
|
name, "ARM", NULL);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -64,9 +64,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator(
|
cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator(
|
||||||
const char* name, const char* architectureId,
|
const char* name, const char* platformName,
|
||||||
const char* additionalPlatformDefinition)
|
const char* additionalPlatformDefinition)
|
||||||
: cmGlobalVisualStudio10Generator(name, architectureId,
|
: cmGlobalVisualStudio10Generator(name, platformName,
|
||||||
additionalPlatformDefinition)
|
additionalPlatformDefinition)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
|
||||||
|
@ -21,7 +21,7 @@ class cmGlobalVisualStudio11Generator:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio11Generator(const char* name,
|
cmGlobalVisualStudio11Generator(const char* name,
|
||||||
const char* architectureId, const char* additionalPlatformDefinition);
|
const char* platformName, const char* additionalPlatformDefinition);
|
||||||
static cmGlobalGeneratorFactory* NewFactory();
|
static cmGlobalGeneratorFactory* NewFactory();
|
||||||
|
|
||||||
virtual void WriteSLNHeader(std::ostream& fout);
|
virtual void WriteSLNHeader(std::ostream& fout);
|
||||||
|
@ -25,17 +25,17 @@ public:
|
|||||||
if(!strcmp(name, vs12Win32generatorName))
|
if(!strcmp(name, vs12Win32generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio12Generator(
|
return new cmGlobalVisualStudio12Generator(
|
||||||
vs12Win32generatorName, NULL, NULL);
|
name, NULL, NULL);
|
||||||
}
|
}
|
||||||
if(!strcmp(name, vs12Win64generatorName))
|
if(!strcmp(name, vs12Win64generatorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio12Generator(
|
return new cmGlobalVisualStudio12Generator(
|
||||||
vs12Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
|
name, "x64", "CMAKE_FORCE_WIN64");
|
||||||
}
|
}
|
||||||
if(!strcmp(name, vs12ARMgeneratorName))
|
if(!strcmp(name, vs12ARMgeneratorName))
|
||||||
{
|
{
|
||||||
return new cmGlobalVisualStudio12Generator(
|
return new cmGlobalVisualStudio12Generator(
|
||||||
vs12ARMgeneratorName, "ARM", NULL);
|
name, "ARM", NULL);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -64,9 +64,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator(
|
cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator(
|
||||||
const char* name, const char* architectureId,
|
const char* name, const char* platformName,
|
||||||
const char* additionalPlatformDefinition)
|
const char* additionalPlatformDefinition)
|
||||||
: cmGlobalVisualStudio11Generator(name, architectureId,
|
: cmGlobalVisualStudio11Generator(name, platformName,
|
||||||
additionalPlatformDefinition)
|
additionalPlatformDefinition)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS12FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS12FindMake.cmake";
|
||||||
@ -100,12 +100,3 @@ cmLocalGenerator *cmGlobalVisualStudio12Generator::CreateLocalGenerator()
|
|||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
return lg;
|
return lg;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
bool cmGlobalVisualStudio12Generator::UseFolderProperty()
|
|
||||||
{
|
|
||||||
// Intentionally skip over the parent class implementation and call the
|
|
||||||
// grand-parent class's implementation. Folders are not supported by the
|
|
||||||
// Express editions in VS10 and earlier, but they are in VS12 Express.
|
|
||||||
return cmGlobalVisualStudio8Generator::UseFolderProperty();
|
|
||||||
}
|
|
||||||
|
@ -21,7 +21,7 @@ class cmGlobalVisualStudio12Generator:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio12Generator(const char* name,
|
cmGlobalVisualStudio12Generator(const char* name,
|
||||||
const char* architectureId, const char* additionalPlatformDefinition);
|
const char* platformName, const char* additionalPlatformDefinition);
|
||||||
static cmGlobalGeneratorFactory* NewFactory();
|
static cmGlobalGeneratorFactory* NewFactory();
|
||||||
|
|
||||||
virtual void WriteSLNHeader(std::ostream& fout);
|
virtual void WriteSLNHeader(std::ostream& fout);
|
||||||
@ -33,7 +33,6 @@ public:
|
|||||||
virtual std::string GetUserMacrosDirectory() { return ""; }
|
virtual std::string GetUserMacrosDirectory() { return ""; }
|
||||||
protected:
|
protected:
|
||||||
virtual const char* GetIDEVersion() { return "12.0"; }
|
virtual const char* GetIDEVersion() { return "12.0"; }
|
||||||
bool UseFolderProperty();
|
|
||||||
private:
|
private:
|
||||||
class Factory;
|
class Factory;
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator()
|
cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator(
|
||||||
|
const char* platformName) : cmGlobalVisualStudio7Generator(platformName)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS71FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS71FindMake.cmake";
|
||||||
this->ProjectConfigurationSectionName = "ProjectConfiguration";
|
this->ProjectConfigurationSectionName = "ProjectConfiguration";
|
||||||
@ -281,20 +282,20 @@ void cmGlobalVisualStudio71Generator
|
|||||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||||
const char* platformMapping)
|
const char* platformMapping)
|
||||||
{
|
{
|
||||||
|
const char* platformName =
|
||||||
|
platformMapping ? platformMapping : this->GetPlatformName();
|
||||||
std::string guid = this->GetGUID(name);
|
std::string guid = this->GetGUID(name);
|
||||||
for(std::vector<std::string>::iterator i = this->Configurations.begin();
|
for(std::vector<std::string>::iterator i = this->Configurations.begin();
|
||||||
i != this->Configurations.end(); ++i)
|
i != this->Configurations.end(); ++i)
|
||||||
{
|
{
|
||||||
fout << "\t\t{" << guid << "}." << *i
|
fout << "\t\t{" << guid << "}." << *i
|
||||||
<< ".ActiveCfg = " << *i << "|"
|
<< ".ActiveCfg = " << *i << "|" << platformName << std::endl;
|
||||||
<< (platformMapping ? platformMapping : "Win32") << std::endl;
|
|
||||||
std::set<std::string>::const_iterator
|
std::set<std::string>::const_iterator
|
||||||
ci = configsPartOfDefaultBuild.find(*i);
|
ci = configsPartOfDefaultBuild.find(*i);
|
||||||
if(!(ci == configsPartOfDefaultBuild.end()))
|
if(!(ci == configsPartOfDefaultBuild.end()))
|
||||||
{
|
{
|
||||||
fout << "\t\t{" << guid << "}." << *i
|
fout << "\t\t{" << guid << "}." << *i
|
||||||
<< ".Build.0 = " << *i << "|"
|
<< ".Build.0 = " << *i << "|" << platformName << std::endl;
|
||||||
<< (platformMapping ? platformMapping : "Win32") << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator
|
class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio71Generator();
|
cmGlobalVisualStudio71Generator(const char* platformName = NULL);
|
||||||
static cmGlobalGeneratorFactory* NewFactory() {
|
static cmGlobalGeneratorFactory* NewFactory() {
|
||||||
return new cmGlobalGeneratorSimpleFactory
|
return new cmGlobalGeneratorSimpleFactory
|
||||||
<cmGlobalVisualStudio71Generator>(); }
|
<cmGlobalVisualStudio71Generator>(); }
|
||||||
|
@ -17,9 +17,16 @@
|
|||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator()
|
cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator(
|
||||||
|
const char* platformName)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
|
||||||
|
|
||||||
|
if (!platformName)
|
||||||
|
{
|
||||||
|
platformName = "Win32";
|
||||||
|
}
|
||||||
|
this->PlatformName = platformName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -144,6 +151,13 @@ cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator()
|
|||||||
return lg;
|
return lg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
|
{
|
||||||
|
cmGlobalVisualStudioGenerator::AddPlatformDefinitions(mf);
|
||||||
|
mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName());
|
||||||
|
}
|
||||||
|
|
||||||
void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
|
void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
// process the configurations
|
// process the configurations
|
||||||
@ -601,20 +615,20 @@ void cmGlobalVisualStudio7Generator
|
|||||||
const std::set<std::string>& configsPartOfDefaultBuild,
|
const std::set<std::string>& configsPartOfDefaultBuild,
|
||||||
const char* platformMapping)
|
const char* platformMapping)
|
||||||
{
|
{
|
||||||
|
const char* platformName =
|
||||||
|
platformMapping ? platformMapping : this->GetPlatformName();
|
||||||
std::string guid = this->GetGUID(name);
|
std::string guid = this->GetGUID(name);
|
||||||
for(std::vector<std::string>::iterator i = this->Configurations.begin();
|
for(std::vector<std::string>::iterator i = this->Configurations.begin();
|
||||||
i != this->Configurations.end(); ++i)
|
i != this->Configurations.end(); ++i)
|
||||||
{
|
{
|
||||||
fout << "\t\t{" << guid << "}." << *i
|
fout << "\t\t{" << guid << "}." << *i
|
||||||
<< ".ActiveCfg = " << *i << "|"
|
<< ".ActiveCfg = " << *i << "|" << platformName << "\n";
|
||||||
<< (platformMapping ? platformMapping : "Win32") << "\n";
|
|
||||||
std::set<std::string>::const_iterator
|
std::set<std::string>::const_iterator
|
||||||
ci = configsPartOfDefaultBuild.find(*i);
|
ci = configsPartOfDefaultBuild.find(*i);
|
||||||
if(!(ci == configsPartOfDefaultBuild.end()))
|
if(!(ci == configsPartOfDefaultBuild.end()))
|
||||||
{
|
{
|
||||||
fout << "\t\t{" << guid << "}." << *i
|
fout << "\t\t{" << guid << "}." << *i
|
||||||
<< ".Build.0 = " << *i << "|"
|
<< ".Build.0 = " << *i << "|" << platformName << "\n";
|
||||||
<< (platformMapping ? platformMapping : "Win32") << "\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ struct cmIDEFlagTable;
|
|||||||
class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator
|
class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio7Generator();
|
cmGlobalVisualStudio7Generator(const char* platformName = NULL);
|
||||||
static cmGlobalGeneratorFactory* NewFactory() {
|
static cmGlobalGeneratorFactory* NewFactory() {
|
||||||
return new cmGlobalGeneratorSimpleFactory
|
return new cmGlobalGeneratorSimpleFactory
|
||||||
<cmGlobalVisualStudio7Generator>(); }
|
<cmGlobalVisualStudio7Generator>(); }
|
||||||
@ -36,9 +36,14 @@ public:
|
|||||||
return cmGlobalVisualStudio7Generator::GetActualName();}
|
return cmGlobalVisualStudio7Generator::GetActualName();}
|
||||||
static const char* GetActualName() {return "Visual Studio 7";}
|
static const char* GetActualName() {return "Visual Studio 7";}
|
||||||
|
|
||||||
|
///! Get the name for the platform.
|
||||||
|
const char* GetPlatformName() const { return this->PlatformName.c_str(); }
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator();
|
virtual cmLocalGenerator *CreateLocalGenerator();
|
||||||
|
|
||||||
|
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||||
|
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
@ -153,6 +158,7 @@ protected:
|
|||||||
// Set during OutputSLNFile with the name of the current project.
|
// Set during OutputSLNFile with the name of the current project.
|
||||||
// There is one SLN file per project.
|
// There is one SLN file per project.
|
||||||
std::string CurrentProject;
|
std::string CurrentProject;
|
||||||
|
std::string PlatformName;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"
|
#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"
|
||||||
|
@ -57,8 +57,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator(
|
cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator(
|
||||||
name, parser.GetArchitectureFamily(), NULL);
|
name, p, NULL);
|
||||||
ret->PlatformName = p;
|
|
||||||
ret->WindowsCEVersion = parser.GetOSVersion();
|
ret->WindowsCEVersion = parser.GetOSVersion();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -96,36 +95,20 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
|
cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator(
|
||||||
const char* name, const char* architectureId,
|
const char* name, const char* platformName,
|
||||||
const char* additionalPlatformDefinition)
|
const char* additionalPlatformDefinition)
|
||||||
|
: cmGlobalVisualStudio71Generator(platformName)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
|
||||||
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
|
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
|
||||||
this->Name = name;
|
this->Name = name;
|
||||||
if (architectureId)
|
|
||||||
{
|
|
||||||
this->ArchitectureId = architectureId;
|
|
||||||
}
|
|
||||||
if (additionalPlatformDefinition)
|
if (additionalPlatformDefinition)
|
||||||
{
|
{
|
||||||
this->AdditionalPlatformDefinition = additionalPlatformDefinition;
|
this->AdditionalPlatformDefinition = additionalPlatformDefinition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
const char* cmGlobalVisualStudio8Generator::GetPlatformName() const
|
|
||||||
{
|
|
||||||
if (!this->PlatformName.empty())
|
|
||||||
{
|
|
||||||
return this->PlatformName.c_str();
|
|
||||||
}
|
|
||||||
if (this->ArchitectureId == "X86")
|
|
||||||
{
|
|
||||||
return "Win32";
|
|
||||||
}
|
|
||||||
return this->ArchitectureId.c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
|
||||||
@ -142,7 +125,6 @@ cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
|
|||||||
void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
|
void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
{
|
{
|
||||||
cmGlobalVisualStudio71Generator::AddPlatformDefinitions(mf);
|
cmGlobalVisualStudio71Generator::AddPlatformDefinitions(mf);
|
||||||
mf->AddDefinition("CMAKE_VS_PLATFORM_NAME", this->GetPlatformName());
|
|
||||||
|
|
||||||
if(this->TargetsWindowsCE())
|
if(this->TargetsWindowsCE())
|
||||||
{
|
{
|
||||||
|
@ -24,14 +24,12 @@ class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio8Generator(const char* name,
|
cmGlobalVisualStudio8Generator(const char* name,
|
||||||
const char* architectureId, const char* additionalPlatformDefinition);
|
const char* platformName, const char* additionalPlatformDefinition);
|
||||||
static cmGlobalGeneratorFactory* NewFactory();
|
static cmGlobalGeneratorFactory* NewFactory();
|
||||||
|
|
||||||
///! Get the name for the generator.
|
///! Get the name for the generator.
|
||||||
virtual const char* GetName() const {return this->Name.c_str();}
|
virtual const char* GetName() const {return this->Name.c_str();}
|
||||||
|
|
||||||
const char* GetPlatformName() const;
|
|
||||||
|
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
@ -87,7 +85,6 @@ protected:
|
|||||||
const char* path, cmTarget &t);
|
const char* path, cmTarget &t);
|
||||||
|
|
||||||
std::string Name;
|
std::string Name;
|
||||||
std::string PlatformName;
|
|
||||||
std::string WindowsCEVersion;
|
std::string WindowsCEVersion;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -62,8 +62,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator(
|
cmGlobalVisualStudio9Generator* ret = new cmGlobalVisualStudio9Generator(
|
||||||
name, parser.GetArchitectureFamily(), NULL);
|
name, p, NULL);
|
||||||
ret->PlatformName = p;
|
|
||||||
ret->WindowsCEVersion = parser.GetOSVersion();
|
ret->WindowsCEVersion = parser.GetOSVersion();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -102,9 +101,9 @@ cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator(
|
cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator(
|
||||||
const char* name, const char* architectureId,
|
const char* name, const char* platformName,
|
||||||
const char* additionalPlatformDefinition)
|
const char* additionalPlatformDefinition)
|
||||||
: cmGlobalVisualStudio8Generator(name, architectureId,
|
: cmGlobalVisualStudio8Generator(name, platformName,
|
||||||
additionalPlatformDefinition)
|
additionalPlatformDefinition)
|
||||||
{
|
{
|
||||||
this->FindMakeProgramFile = "CMakeVS9FindMake.cmake";
|
this->FindMakeProgramFile = "CMakeVS9FindMake.cmake";
|
||||||
|
@ -25,7 +25,7 @@ class cmGlobalVisualStudio9Generator :
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio9Generator(const char* name,
|
cmGlobalVisualStudio9Generator(const char* name,
|
||||||
const char* architectureId, const char* additionalPlatformDefinition);
|
const char* platformName, const char* additionalPlatformDefinition);
|
||||||
static cmGlobalGeneratorFactory* NewFactory();
|
static cmGlobalGeneratorFactory* NewFactory();
|
||||||
|
|
||||||
///! create the correct local generator
|
///! create the correct local generator
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator()
|
cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator()
|
||||||
{
|
{
|
||||||
this->ArchitectureId = "X86";
|
|
||||||
this->AdditionalPlatformDefinition = NULL;
|
this->AdditionalPlatformDefinition = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,9 +498,6 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf)
|
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)
|
if(this->AdditionalPlatformDefinition)
|
||||||
{
|
{
|
||||||
mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE");
|
mf->AddDefinition(this->AdditionalPlatformDefinition, "TRUE");
|
||||||
|
@ -104,7 +104,6 @@ protected:
|
|||||||
std::string GetUtilityDepend(cmTarget* target);
|
std::string GetUtilityDepend(cmTarget* target);
|
||||||
typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
|
typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
|
||||||
UtilityDependsMap UtilityDepends;
|
UtilityDependsMap UtilityDepends;
|
||||||
std::string ArchitectureId;
|
|
||||||
const char* AdditionalPlatformDefinition;
|
const char* AdditionalPlatformDefinition;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -20,8 +20,12 @@ int cmVisualStudioWCEPlatformParser::ParseVersion(const char* version)
|
|||||||
const std::string vckey = registryBase + "\\Setup\\VC;ProductDir";
|
const std::string vckey = registryBase + "\\Setup\\VC;ProductDir";
|
||||||
const std::string vskey = registryBase + "\\Setup\\VS;ProductDir";
|
const std::string vskey = registryBase + "\\Setup\\VS;ProductDir";
|
||||||
|
|
||||||
if(!cmSystemTools::ReadRegistryValue(vckey.c_str(), this->VcInstallDir) ||
|
if(!cmSystemTools::ReadRegistryValue(vckey.c_str(),
|
||||||
!cmSystemTools::ReadRegistryValue(vskey.c_str(), this->VsInstallDir))
|
this->VcInstallDir,
|
||||||
|
cmSystemTools::KeyWOW64_32) ||
|
||||||
|
!cmSystemTools::ReadRegistryValue(vskey.c_str(),
|
||||||
|
this->VsInstallDir,
|
||||||
|
cmSystemTools::KeyWOW64_32))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user