25 lines
806 B
CMake
25 lines
806 B
CMake
# C compiler name
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
|
set(CMAKE_C_COMPILER_IS_INTEL ON)
|
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
|
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
|
set(CMAKE_C_COMPILER_IS_CLANG ON)
|
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|
set(CMAKE_C_COMPILER_IS_GCC ON)
|
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
|
set(CMAKE_C_COMPILER_IS_MSVC ON)
|
|
endif()
|
|
|
|
# C++ compiler name
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|
set(CMAKE_CXX_COMPILER_IS_INTEL ON)
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
|
|
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
|
set(CMAKE_CXX_COMPILER_IS_CLANG ON)
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
set(CMAKE_CXX_COMPILER_IS_GCC ON)
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
set(CMAKE_CXX_COMPILER_IS_MSVC ON)
|
|
endif()
|
|
|