Added code that prints the compiler ID and fixed bin2h's compiler detection code to use the C compiler ID of the C++ compiler ID (which isn't available then as bin2h is in c)
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
d6ec92cba5
commit
01abc0541a
2 changed files with 7 additions and 3 deletions
|
@ -18,6 +18,8 @@ set(RENDERER "SDLTexture" CACHE STRING "Which renderer the game should use: 'Ope
|
||||||
|
|
||||||
project(CSE2 LANGUAGES C CXX)
|
project(CSE2 LANGUAGES C CXX)
|
||||||
|
|
||||||
|
message(STATUS "Compiler ID : ${CMAKE_CXX_COMPILER_ID}")
|
||||||
|
|
||||||
# Has to be placed after "project()"
|
# Has to be placed after "project()"
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
# Using Clang (this is a match so that we also get "AppleClang" which is the Apple-provided Clang
|
# Using Clang (this is a match so that we also get "AppleClang" which is the Apple-provided Clang
|
||||||
|
|
|
@ -14,20 +14,22 @@ set_target_properties(bin2h PROPERTIES
|
||||||
C_EXTENSIONS OFF
|
C_EXTENSIONS OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
message(STATUS "Compiler ID : ${CMAKE_C_COMPILER_ID}")
|
||||||
|
|
||||||
# Has to be placed after "project()"
|
# Has to be placed after "project()"
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
# Using Clang (this is a match so that we also get "AppleClang" which is the Apple-provided Clang
|
# Using Clang (this is a match so that we also get "AppleClang" which is the Apple-provided Clang
|
||||||
set(COMPILER_IS_CLANG true)
|
set(COMPILER_IS_CLANG true)
|
||||||
message(STATUS "Compiling with clang")
|
message(STATUS "Compiling with clang")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
# Using GCC
|
# Using GCC
|
||||||
set(COMPILER_IS_GCC true)
|
set(COMPILER_IS_GCC true)
|
||||||
message(STATUS "Compiling with gcc")
|
message(STATUS "Compiling with gcc")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||||
# Using Intel C++
|
# Using Intel C++
|
||||||
set(COMPILER_IS_ICC true)
|
set(COMPILER_IS_ICC true)
|
||||||
message(STATUS "Compiling with ICC")
|
message(STATUS "Compiling with ICC")
|
||||||
|
|
Loading…
Add table
Reference in a new issue