2020-06-22 14:14:36 -07:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2020-07-02 00:12:54 -07:00
|
|
|
project(detect_compiler NONE)
|
|
|
|
|
2020-07-13 12:03:53 -07:00
|
|
|
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()
|
2020-07-02 00:12:54 -07:00
|
|
|
|
|
|
|
enable_language(C)
|
|
|
|
enable_language(CXX)
|
2020-06-22 14:14:36 -07:00
|
|
|
|
|
|
|
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}")
|
2020-10-23 23:54:36 -04:00
|
|
|
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}")
|
2020-09-27 21:18:27 -04:00
|
|
|
message("#COMPILER_CXX_VERSION#${CMAKE_CXX_COMPILER_VERSION}")
|
|
|
|
message("#COMPILER_CXX_ID#${CMAKE_CXX_COMPILER_ID}")
|