aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichaƂ Janiszewski <janisozaur@users.noreply.github.com>2018-03-03 22:09:55 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-03-03 13:09:55 -0800
commit6f5573e889c4125f15fff0ee63b60ebcb79fed2f (patch)
treed8ba4187e83d47bfcc3d2ea6f72e9273dc383457 /scripts
parenta4b917b04c8cb12933fc3710610da2cdd866c56d (diff)
downloadvcpkg-6f5573e889c4125f15fff0ee63b60ebcb79fed2f.tar.gz
vcpkg-6f5573e889c4125f15fff0ee63b60ebcb79fed2f.zip
[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).
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_configure_cmake.cmake6
1 files changed, 4 insertions, 2 deletions
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)