From 6f5573e889c4125f15fff0ee63b60ebcb79fed2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 3 Mar 2018 22:09:55 +0100 Subject: [vcpkg] Allow ninja-based parallel configuration for UWP targets (#2929) Allow using ninja as parallel configuration runner even if it is not used as generator. This significantly improves throughput for usecases like CI with timeouts and more than one CPU (e.g. AppVeyor). --- scripts/cmake/vcpkg_configure_cmake.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 724446f92..e590fb8e7 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -62,10 +62,12 @@ function(vcpkg_configure_cmake) set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() - set(NINJA_CAN_BE_USED ON) + set(NINJA_CAN_BE_USED ON) # Ninja as generator + set(NINJA_HOST ON) # Ninja as parallel configurator if(_csc_HOST_ARCHITECTURE STREQUAL "x86") # Prebuilt ninja binaries are only provided for x64 hosts set(NINJA_CAN_BE_USED OFF) + set(NINJA_HOST OFF) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility set(NINJA_CAN_BE_USED OFF) @@ -214,7 +216,7 @@ function(vcpkg_configure_cmake) -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) - if(NINJA_CAN_BE_USED AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) + if(NINJA_HOST AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) -- cgit v1.2.3