diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-13 17:30:48 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-13 17:30:48 -0800 |
| commit | 2bc4064b1e99b31bd550982011e251f97d5a0aef (patch) | |
| tree | ebb8e0cfad24bb932c51ea5cff5d7a3a901cc4c7 /scripts/cmake | |
| parent | 45425fe6f01f45847679d27d169e9de37fad824c (diff) | |
| download | vcpkg-2bc4064b1e99b31bd550982011e251f97d5a0aef.tar.gz vcpkg-2bc4064b1e99b31bd550982011e251f97d5a0aef.zip | |
[vcpkg_build_cmake] Add option to specify the 64-bit toolset
Diffstat (limited to 'scripts/cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_build_cmake.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 8ba4b9fae..eb50222ba 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,7 +1,16 @@ function(vcpkg_build_cmake) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET" "" "" ${ARGN}) + + set(MSVC_EXTRA_ARGS) + + # Specifies the architecture of the toolset, NOT the architecture of the produced binary + if (_bc_MSVC_64_TOOLSET) + list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") + endif() + message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m + COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -9,7 +18,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) |
