2019-02-12 16:31:17 +00:00
|
|
|
# C compiler name
|
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
|
|
|
set(CMAKE_C_COMPILER_IS_INTEL ON)
|
2019-02-16 10:10:12 +00:00
|
|
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
|
|
|
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
2019-02-12 16:31:17 +00:00
|
|
|
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)
|
2019-02-16 10:10:12 +00:00
|
|
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
|
|
|
|
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
2019-02-12 16:31:17 +00:00
|
|
|
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()
|
|
|
|
|