Fix compiler detection and flags
- Use CMAKE_<LANG>_COMPILER_ID to detect compiler as CMake docs suggest - Support clang properly - Don't set -Werror
This commit is contained in:
parent
d04d618253
commit
dafda54e50
1 changed files with 3 additions and 3 deletions
|
@ -843,10 +843,10 @@ endif()
|
|||
|
||||
# Stratagus needs to have char by default signed
|
||||
# No idea how to tell this to other compilers
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -Werror")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUC)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char")
|
||||
endif()
|
||||
if(WIN32 AND MSVC)
|
||||
|
|
Loading…
Reference in a new issue