aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorras0219 <robertallenschumacher@gmail.com>2020-07-02 00:12:54 -0700
committerGitHub <noreply@github.com>2020-07-02 00:12:54 -0700
commit9ddf284eceacb2c1bb401ed8ff57abf63195ac46 (patch)
tree2bcfa2f30defc81e271a7d603fdf91598fe5d9e5 /scripts
parenta218d0e61dbca3328b38f9bf3a96d44a2e1948ae (diff)
downloadvcpkg-9ddf284eceacb2c1bb401ed8ff57abf63195ac46.tar.gz
vcpkg-9ddf284eceacb2c1bb401ed8ff57abf63195ac46.zip
[vcpkg] Improve performance of compiler tracking by suppressing aspects of CMake's compiler detection. (#12203)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/detect_compiler/CMakeLists.txt12
-rw-r--r--scripts/detect_compiler/CONTROL3
2 files changed, 14 insertions, 1 deletions
diff --git a/scripts/detect_compiler/CMakeLists.txt b/scripts/detect_compiler/CMakeLists.txt
index 5dc0889a6..379a87d03 100644
--- a/scripts/detect_compiler/CMakeLists.txt
+++ b/scripts/detect_compiler/CMakeLists.txt
@@ -1,5 +1,15 @@
cmake_minimum_required(VERSION 3.10)
-project(detect_compiler)
+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)
+
+enable_language(C)
+enable_language(CXX)
file(SHA1 "${CMAKE_CXX_COMPILER}" CXX_HASH)
file(SHA1 "${CMAKE_C_COMPILER}" C_HASH)
diff --git a/scripts/detect_compiler/CONTROL b/scripts/detect_compiler/CONTROL
new file mode 100644
index 000000000..d76f041f0
--- /dev/null
+++ b/scripts/detect_compiler/CONTROL
@@ -0,0 +1,3 @@
+Source: detect-compiler
+Version: 0
+Description: None