mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00:00
[CMAKE] Define GCC and CLANG cmake variables
This commit is contained in:
parent
09abc443b1
commit
e90b6bb1e9
1 changed files with 14 additions and 0 deletions
|
@ -36,6 +36,20 @@ else()
|
|||
"Whether to compile for debugging.")
|
||||
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")
|
||||
set(GCC FALSE CACHE BOOL "The compiler is GCC")
|
||||
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()
|
||||
|
||||
if(MSVC AND (NOT USE_CLANG_CL))
|
||||
set(KDBG FALSE CACHE BOOL
|
||||
"Whether to compile in the integrated kernel debugger.")
|
||||
|
|
Loading…
Reference in a new issue