summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-07 19:57:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-14 13:22:26 (GMT)
commitd079e71c290c3c55a2db5180953daf014a964c25 (patch)
treea2b7f24b599049e22e21fedca8fd9955e5c0d616 /Modules
parent779939a00ebc21419404737f2fc2b34e7775f086 (diff)
downloadCMake-d079e71c290c3c55a2db5180953daf014a964c25.zip
CMake-d079e71c290c3c55a2db5180953daf014a964c25.tar.gz
CMake-d079e71c290c3c55a2db5180953daf014a964c25.tar.bz2
VS: Provide an option to use x64 host tools
Visual Studio provides toolchains that are themselves built for 32-bit or 64-bit host architectures. By default it uses the 32-bit tools, but it can be told to prefer the 64-bit tools on 64-bit hosts. Extend the `CMAKE_GENERATOR_TOOLSET` specification to provide a way to request use of the 64-bit host tools. Closes: #15622
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake5
-rw-r--r--Modules/CompilerId/VS-10.vcxproj.in3
2 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 145efc6..59d8ab6 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -182,6 +182,11 @@ Id flags: ${testflags}
else()
set(id_toolset "")
endif()
+ if(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE)
+ set(id_PreferredToolArchitecture "<PreferredToolArchitecture>${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}</PreferredToolArchitecture>")
+ else()
+ set(id_PreferredToolArchitecture "")
+ endif()
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
set(id_system "<ApplicationType>Windows Phone</ApplicationType>")
elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in
index 2870a11..50be9cb 100644
--- a/Modules/CompilerId/VS-10.vcxproj.in
+++ b/Modules/CompilerId/VS-10.vcxproj.in
@@ -16,6 +16,9 @@
@id_WindowsSDKDesktopARMSupport@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ @id_PreferredToolArchitecture@
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@id_toolset@