FreeRDP/cmake/CompilerDetect.cmake
akallabeth 26e570e9fe
[cmake] unify clang detection
* Move Clang detection to own CMake file
* Check for Clang and AppleClang
* Use CMAKE_COMPILER_IS_CLANG to check for Clang in code
2024-06-25 09:09:50 +02:00

7 lines
252 B
CMake

if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_COMPILER_IS_CLANG 1)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
set(CMAKE_COMPILER_IS_CLANG 1)
endif()