mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 09:59:07 +08:00
d369df7ecf
* [rollup:2021-07-06 1/8] PR #18272 (@strega-nil) [scripts-audit] vcpkg_from_* * [rollup:2021-07-06 2/8] PR #18319 (@strega-nil) [scripts-audit] add guidelines for cmake * [rollup 2021-07-06 3/8] PR #18410 (@mheyman) [vcpkg-cmake-config] documentation fix * [rollup:2021-07-06 4/8] PR #18488 (@strega-nil) [scripts-audit] vcpkg_execute_* * [rollup:2021-07-06 5/8] PR #18517 (@strega-nil) [scripts-audit] vcpkg_extract_source_archive * [rollup:2021-07-06 6/8] PR #18674 (@NancyLi1013) [vcpkg doc] Update examples * [rollup:2021-07-06 7/8] PR #18695 (@JackBoosY) [vcpkg] Update the minimum version of vcpkg * [rollup:2021-07-06 8/8] PR #18758 (@ras0219-msft) [vcpkg_from_git] Fix error if downloads folder does not exist * build docs! * fix bond:*-windows * fix nmap Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: Michael Heyman <Michael.Heyman@jhuapl.edu> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Robert Schumacher <ras0219@outlook.com>
25 lines
844 B
CMake
25 lines
844 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(detect_compiler NONE)
|
|
|
|
if(CMAKE_GENERATOR STREQUAL "Ninja" AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
set(CMAKE_C_COMPILER_WORKS 1)
|
|
set(CMAKE_C_COMPILER_FORCED 1)
|
|
set(CMAKE_CXX_COMPILER_WORKS 1)
|
|
set(CMAKE_CXX_COMPILER_FORCED 1)
|
|
endif()
|
|
|
|
enable_language(C)
|
|
enable_language(CXX)
|
|
|
|
file(SHA1 "${CMAKE_CXX_COMPILER}" CXX_HASH)
|
|
file(SHA1 "${CMAKE_C_COMPILER}" C_HASH)
|
|
string(SHA1 COMPILER_HASH "${C_HASH}${CXX_HASH}")
|
|
|
|
message("#COMPILER_HASH#${COMPILER_HASH}")
|
|
message("#COMPILER_C_HASH#${C_HASH}")
|
|
message("#COMPILER_C_VERSION#${CMAKE_C_COMPILER_VERSION}")
|
|
message("#COMPILER_C_ID#${CMAKE_C_COMPILER_ID}")
|
|
message("#COMPILER_CXX_HASH#${CXX_HASH}")
|
|
message("#COMPILER_CXX_VERSION#${CMAKE_CXX_COMPILER_VERSION}")
|
|
message("#COMPILER_CXX_ID#${CMAKE_CXX_COMPILER_ID}")
|