aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-14 17:10:33 -0700
committerGitHub <noreply@github.com>2017-03-14 17:10:33 -0700
commite91218e63804d79154af94af99530a51395d28eb (patch)
tree1374e67ec4b2e2ea889871070492adc9c78430ce /scripts
parent1a8d15f528dc085d9bbaa9f1fd205c1cf9320fb4 (diff)
parentb87c1c1bea3f7032fa8ef28376a4defa1c0a2eee (diff)
downloadvcpkg-e91218e63804d79154af94af99530a51395d28eb.tar.gz
vcpkg-e91218e63804d79154af94af99530a51395d28eb.zip
Merge pull request #790 from Mixaill/msbuild-platformtoolset
vcpkg_build_msbuild: add PLATFORM_TOOLSET property
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_build_msbuild.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake
index 748b47b7b..6fe3f5aa0 100644
--- a/scripts/cmake/vcpkg_build_msbuild.cmake
+++ b/scripts/cmake/vcpkg_build_msbuild.cmake
@@ -9,6 +9,7 @@
# [DEBUG_CONFIGURATION <debug_configuration>] @ (default = "Debug")
# [TARGET_PLATFORM_VERSION <windows_target_platform_version>]
# [PLATFORM <platform>] # (default = "${TRIPLET_SYSTEM_ARCH}")
+# [PLATFORM_TOOLSET <platform_toolset>] # (default = "${VCPKG_PLATFORM_TOOLSET}")
# [OPTIONS arg1 [arg2 ...]]
# [OPTIONS_RELEASE arg1 [arg2 ...]]
# [OPTIONS_DEBUG arg1 [arg2 ...]]
@@ -29,6 +30,9 @@
# ``PLATFORM``
# The platform (``/p:Platform`` msbuild parameter)
# used for the build.
+# ``PLATFORM_TOOLSET``
+# The platform toolset (``/p:PlatformToolset`` msbuild parameter)
+# used for the build.
# ``OPTIONS``
# The options passed to msbuild for all builds.
# ``OPTIONS_RELEASE``
@@ -39,7 +43,7 @@
function(vcpkg_build_msbuild)
- cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
+ cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
if(NOT DEFINED _csc_RELEASE_CONFIGURATION)
set(_csc_RELEASE_CONFIGURATION Release)
@@ -50,6 +54,9 @@ function(vcpkg_build_msbuild)
if(NOT DEFINED _csc_PLATFORM)
set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
+ if(NOT DEFINED _csc_PLATFORM_TOOLSET)
+ set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET})
+ endif()
if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION)
vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION)
endif()
@@ -60,6 +67,7 @@ function(vcpkg_build_msbuild)
list(APPEND _csc_OPTIONS
/t:${_csc_TARGET}
/p:Platform=${_csc_PLATFORM}
+ /p:PlatformToolset=${_csc_PLATFORM_TOOLSET}
/p:VCPkgLocalAppDataDisabled=true
/p:UseIntelMKL=No
/p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION}