From 453ffa5aad5cb110f1c4b233bd0876154276839c Mon Sep 17 00:00:00 2001 From: lakinwecker Date: Sat, 28 Sep 2019 12:32:15 -0600 Subject: 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. --- ports/gdal/portfile.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index a336e1f1e..0e836e0d2 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -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 ) -- cgit v1.2.3