aboutsummaryrefslogtreecommitdiff
path: root/scripts/detect_compiler
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2020-07-13 12:03:53 -0700
committerGitHub <noreply@github.com>2020-07-13 12:03:53 -0700
commit52a9d9a9e481f835e9c3b9ba028ff2f833cb3624 (patch)
treea4828a1afb468750ec2b94f297dd48c53beebcbe /scripts/detect_compiler
parentf4b66c5e2bea02aaa9569b5369e3af3bb0bf737c (diff)
downloadvcpkg-52a9d9a9e481f835e9c3b9ba028ff2f833cb3624.tar.gz
vcpkg-52a9d9a9e481f835e9c3b9ba028ff2f833cb3624.zip
[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 <bion@microsoft.com> * [vcpkg] Format Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: Billy O'Neal <bion@microsoft.com>
Diffstat (limited to 'scripts/detect_compiler')
-rw-r--r--scripts/detect_compiler/CMakeLists.txt14
-rw-r--r--scripts/detect_compiler/portfile.cmake4
2 files changed, 10 insertions, 8 deletions
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}")