mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
CMakeLists.txt:
Use CMAKE_CXX_STANDARD to specify c++11 compile flags instead of hardcoding -std=c++11 since that causes issues with C files, specifically with clang [9.0]
This commit is contained in:
parent
13ab43f5e2
commit
62170b3d06
1 changed files with 4 additions and 2 deletions
|
@ -93,9 +93,11 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
|
||||
if(COMPILER_SUPPORTS_CXX11)
|
||||
add_definitions(-std=c++11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
elseif(COMPILER_SUPPORTS_CXX0X)
|
||||
add_definitions(-std=c++0x)
|
||||
set(CMAKE_CXX_STANDARD 0x)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
else()
|
||||
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue