mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Merge pull request #474 from r-a-sattarov/master
CMake: fixed compiler check algorithm (support of C++11)
This commit is contained in:
commit
de2cf327b9
4 changed files with 5 additions and 6 deletions
|
@ -116,18 +116,17 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
#add_definitions(-Wall)
|
||||
add_definitions(-Werror=format-security)
|
||||
add_definitions(-Werror=format)
|
||||
|
||||
# Compiler check (needs -std=c++11 flag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
|
||||
if(COMPILER_SUPPORTS_CXX11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
elseif(COMPILER_SUPPORTS_CXX0X)
|
||||
set(CMAKE_CXX_STANDARD 0x)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
else()
|
||||
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
if(CPU_TYPE)
|
||||
add_definitions(-DCPUSTRING="${CPU_TYPE}")
|
||||
|
|
0
neo/cmake-linux-debug-nosimd.sh
Normal file → Executable file
0
neo/cmake-linux-debug-nosimd.sh
Normal file → Executable file
0
neo/cmake-linux-release-nosimd.sh
Normal file → Executable file
0
neo/cmake-linux-release-nosimd.sh
Normal file → Executable file
|
@ -113,7 +113,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define CPUSTRING "e2k"
|
||||
#elif defined(__aarch64__) || defined(__ARM64__) || defined(_M_ARM64)
|
||||
#define CPUSTRING "aarch64"
|
||||
#else
|
||||
#else
|
||||
#error unknown CPU
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue