Speed up the gdal build by using all available cores for make. (#8375)

* Speed up the gdal build by using all available cores for make.

* Also build the debug build with all cores.

* Addresses the review comments.

Use VCPKG_CONCURRENCY so the normal vcpkg concurrency controls apply.
Use vcpkg_execute_build_process and NO_PARALLEL_COMMAND which allows
for builds to be retried in some cases where parallel builds might fail.
This commit is contained in:
lakinwecker 2019-09-28 12:32:15 -06:00 committed by Curtis J Bezault
parent 60c5814063
commit 453ffa5aad

View File

@ -352,8 +352,9 @@ elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STRE
)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND make
vcpkg_execute_build_process(
COMMAND make -j ${VCPKG_CONCURRENCY}
NO_PARALLEL_COMMAND make
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME make-build-${TARGET_TRIPLET}-release
)
@ -388,8 +389,9 @@ elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STRE
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND make
vcpkg_execute_build_process(
COMMAND make -j ${VCPKG_CONCURRENCY}
NO_PARALLEL_COMMAND make
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME make-build-${TARGET_TRIPLET}-debug
)