summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-28 13:49:56 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-11-28 13:49:56 (GMT)
commit581b0c0d078b5f07f68a53b118f44fc6e8313601 (patch)
tree678101ad6510bb107759896e50f2061e22cc00ac /Modules
parent1ed04648519f8dad60dbe6c1b3952429a011eb4b (diff)
parent3a1006e41fd7be22c415d1de45364f0c8ff4b697 (diff)
downloadCMake-581b0c0d078b5f07f68a53b118f44fc6e8313601.zip
CMake-581b0c0d078b5f07f68a53b118f44fc6e8313601.tar.gz
CMake-581b0c0d078b5f07f68a53b118f44fc6e8313601.tar.bz2
Merge topic 'windows-ce'
3a1006e VS: Added "Deploy" at project configuration for WindowsCE targets 40c36c9 VS: Make DetermineCompilerId working with WinCE too 038df9e VS: Allow setting the name of the target platform 6fe4fcb VS: Add parser for WCE.VCPlatform.config to read WinCE platforms 2118a20 VS: Support setting correct subsystem and entry point for WinCE 6920fed VS: Change variable type of Name from const char* to string 102521b VS: Change variable type of ArchitectureId from const char* to string 332dc09 VS: Add static method to get the base of the registry d41d4d3 VS: Add CMAKE_VS_PLATFORM_NAME definition to cmMakefile 14861f8 VS: Remove TargetMachine for linker when checking compiler id
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompilerId.c.in4
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in4
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake19
-rw-r--r--Modules/CMakeDetermineSystem.cmake6
-rw-r--r--Modules/CompilerId/VS-7.vcproj.in3
5 files changed, 25 insertions, 11 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 2d76c7a..3d1380c 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -228,3 +228,7 @@ int main(int argc, char* argv[])
return require;
}
#endif
+
+#ifdef ADD_MAINCRTSTARTUP
+void mainCRTStartup() {}
+#endif
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 5e70a41..142a5c5 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -210,3 +210,7 @@ int main(int argc, char* argv[])
(void)argv;
return require;
}
+
+#ifdef ADD_MAINCRTSTARTUP
+extern "C" void mainCRTStartup() {}
+#endif
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 906a5e7..43469ea 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -107,11 +107,14 @@ Id flags: ${testflags}
")
# Compile the compiler identification source.
- if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)( .NET)?( 200[358])? *((Win64|IA64|ARM))?")
+ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
set(vs_version ${CMAKE_MATCH_1})
- set(vs_arch ${CMAKE_MATCH_4})
+ set(id_arch ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_cl cl.exe)
+ if(NOT id_arch)
+ set(id_arch Win32)
+ endif()
if(NOT "${vs_version}" VERSION_LESS 10)
set(v 10)
set(ext vcxproj)
@@ -123,25 +126,23 @@ Id flags: ${testflags}
set(v 6)
set(ext dsp)
endif()
- if("${vs_arch}" STREQUAL "Win64")
- set(id_machine_7 17)
+ if("${id_arch}" STREQUAL "x64")
set(id_machine_10 MachineX64)
- set(id_arch x64)
- elseif("${vs_arch}" STREQUAL "IA64")
- set(id_machine_7 5)
+ elseif("${id_arch}" STREQUAL "Itanium")
set(id_machine_10 MachineIA64)
set(id_arch ia64)
else()
set(id_machine_6 x86)
- set(id_machine_7 1)
set(id_machine_10 MachineX86)
- set(id_arch Win32)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET)
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
else()
set(id_toolset "")
endif()
+ if(CMAKE_VS_WINCE_VERSION)
+ set(id_definitions "ADD_MAINCRTSTARTUP")
+ 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)
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index cd33447..c7f9c32 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -106,6 +106,12 @@ if(CMAKE_SYSTEM_NAME)
set(CMAKE_CROSSCOMPILING TRUE)
endif()
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
+elseif(CMAKE_VS_WINCE_VERSION)
+ set(CMAKE_SYSTEM_NAME "WindowsCE")
+ set(CMAKE_SYSTEM_VERSION "${CMAKE_VS_WINCE_VERSION}")
+ set(CMAKE_SYSTEM_PROCESSOR "${MSVC_C_ARCHITECTURE_ID}")
+ set(CMAKE_CROSSCOMPILING TRUE)
+ set(PRESET_CMAKE_SYSTEM_NAME TRUE)
else()
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
diff --git a/Modules/CompilerId/VS-7.vcproj.in b/Modules/CompilerId/VS-7.vcproj.in
index 71bf64d..b1449e4 100644
--- a/Modules/CompilerId/VS-7.vcproj.in
+++ b/Modules/CompilerId/VS-7.vcproj.in
@@ -24,7 +24,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- PreprocessorDefinitions=""
+ PreprocessorDefinitions="@id_definitions@"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -37,7 +37,6 @@
LinkIncremental="1"
GenerateDebugInformation="false"
SubSystem="1"
- TargetMachine="@id_machine_7@"
/>
<Tool
Name="VCPostBuildEventTool"