From 169521070adf69bfb919f7b8f7f7217e0a7488e5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 23 Apr 2017 00:11:42 -0700 Subject: [PATCH] [vcpkg] Ninja is only 64-bit; do not use on x86 --- scripts/cmake/vcpkg_configure_cmake.cmake | 8 +++++++- toolsrc/src/vcpkg_System.cpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 81616d72d7..5eb5d6134b 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -5,9 +5,15 @@ function(vcpkg_configure_cmake) message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap-vcpkg.bat\n") endif() + if(ENV{PROCESSOR_ARCHITEW6432}) + set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) + endif() + if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) - elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 8cf9b48749..f5a34e3ea6 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -46,6 +46,7 @@ namespace vcpkg::System L"OS", L"PATHEXT", L"PROCESSOR_ARCHITECTURE", + L"PROCESSOR_ARCHITEW6432", L"PROCESSOR_IDENTIFIER", L"PROCESSOR_LEVEL", L"PROCESSOR_REVISION",