mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[CMAKE] Also set GCC/CLANG variables on amd64 builds
This commit is contained in:
parent
bc3a471413
commit
76a241dea6
1 changed files with 19 additions and 0 deletions
|
@ -44,3 +44,22 @@ set(_PREFAST_ FALSE CACHE BOOL
|
||||||
cmake_dependent_option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON
|
cmake_dependent_option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON
|
||||||
"CMAKE_BUILD_TYPE STREQUAL Debug" OFF)
|
"CMAKE_BUILD_TYPE STREQUAL Debug" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(GCC TRUE CACHE BOOL "The compiler is GCC")
|
||||||
|
set(CLANG FALSE CACHE BOOL "The compiler is LLVM Clang")
|
||||||
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
|
# We can use LLVM Clang mimicking CL or GCC. Account for this
|
||||||
|
if (MSVC)
|
||||||
|
set(GCC FALSE CACHE BOOL "The compiler is GCC")
|
||||||
|
else()
|
||||||
|
set(GCC TRUE CACHE BOOL "The compiler is GCC")
|
||||||
|
endif()
|
||||||
|
set(CLANG TRUE CACHE BOOL "The compiler is LLVM Clang")
|
||||||
|
elseif(MSVC) # aka CMAKE_C_COMPILER_ID STEQUAL "MSVC"
|
||||||
|
set(GCC FALSE CACHE BOOL "The compiler is GCC")
|
||||||
|
set(CLANG FALSE CACHE BOOL "The compiler is LLVM Clang")
|
||||||
|
# MSVC variable is already set by cmake
|
||||||
|
else()
|
||||||
|
message("WARNING: the compiler has not been recognized")
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue