From 52a9d9a9e481f835e9c3b9ba028ff2f833cb3624 Mon Sep 17 00:00:00 2001 From: ras0219 <533828+ras0219@users.noreply.github.com> Date: Mon, 13 Jul 2020 12:03:53 -0700 Subject: [vcpkg] Enable binary caching by default (#12370) * [vcpkg] Enable binary caching by default. Support `x-` migration. Fix passing multiple copies of single parameter arguments. * [vcpkg] Handle x- prefixes for general arguments * [vcpkg] Fix #12285 and improve documentation of default binary cache path * [vcpkg] Revert x- prefix homogenization for per-command arguments * [vcpkg] Only use accelerated compiler detection for Windows Desktop + Ninja. Improve breadcrumbs for users encountering issues. * [vcpkg] Fix compiler tracking not pre-downloading Ninja. Fix compiler tracking not looking in -err.log. * [vcpkg] Update toolsrc/src/vcpkg/binarycaching.cpp Co-authored-by: Billy O'Neal * [vcpkg] Format Co-authored-by: Robert Schumacher Co-authored-by: Billy O'Neal --- scripts/detect_compiler/CMakeLists.txt | 14 ++++++++------ scripts/detect_compiler/portfile.cmake | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/detect_compiler/CMakeLists.txt b/scripts/detect_compiler/CMakeLists.txt index 379a87d03..ea27db2b9 100644 --- a/scripts/detect_compiler/CMakeLists.txt +++ b/scripts/detect_compiler/CMakeLists.txt @@ -1,12 +1,14 @@ cmake_minimum_required(VERSION 3.10) project(detect_compiler NONE) -set(CMAKE_C_COMPILER_WORKS 1) -set(CMAKE_C_COMPILER_ID_RUN 1) -set(CMAKE_C_COMPILER_FORCED 1) -set(CMAKE_CXX_COMPILER_WORKS 1) -set(CMAKE_CXX_COMPILER_ID_RUN 1) -set(CMAKE_CXX_COMPILER_FORCED 1) +if(CMAKE_GENERATOR STREQUAL "Ninja" AND CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(CMAKE_C_COMPILER_WORKS 1) + set(CMAKE_C_COMPILER_ID_RUN 1) + set(CMAKE_C_COMPILER_FORCED 1) + set(CMAKE_CXX_COMPILER_WORKS 1) + set(CMAKE_CXX_COMPILER_ID_RUN 1) + set(CMAKE_CXX_COMPILER_FORCED 1) +endif() enable_language(C) enable_language(CXX) diff --git a/scripts/detect_compiler/portfile.cmake b/scripts/detect_compiler/portfile.cmake index 16c760706..4f68faea4 100644 --- a/scripts/detect_compiler/portfile.cmake +++ b/scripts/detect_compiler/portfile.cmake @@ -2,6 +2,8 @@ set(LOGS ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-out.log ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-err.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-err.log ) foreach(LOG IN LISTS LOGS) @@ -22,7 +24,5 @@ foreach(LOG IN LISTS LOGS) if(EXISTS ${LOG}) file(READ "${LOG}" _contents) message("${_contents}") - return() endif() endforeach() -message(FATAL_ERROR "Could read logs: ${LOGS}") -- cgit v1.2.3