2016-09-19 11:50:08 +08:00
|
|
|
function(vcpkg_build_cmake)
|
2017-01-14 09:30:48 +08:00
|
|
|
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()
|
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-rel")
|
|
|
|
vcpkg_execute_required_process(
|
2017-01-14 09:30:48 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS}
|
2016-09-19 11:50:08 +08:00
|
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
|
|
|
LOGNAME build-${TARGET_TRIPLET}-rel
|
|
|
|
)
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-rel done")
|
|
|
|
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-dbg")
|
|
|
|
vcpkg_execute_required_process(
|
2017-01-14 09:30:48 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS}
|
2016-09-19 11:50:08 +08:00
|
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
|
|
|
LOGNAME build-${TARGET_TRIPLET}-dbg
|
|
|
|
)
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
|
|
|
|
endfunction()
|