mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
CMake: Use gnu++* instead of c++*
This is for consistency with the CMake 3.1+ behavior and allows the use of GNU extensions. Thanks @rdb!
This commit is contained in:
parent
dd490656a0
commit
de03c2f7ff
@ -10,11 +10,11 @@ enable_testing()
|
||||
# the box; for older versions we take a shot in the dark:
|
||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||
check_cxx_compiler_flag("-std=gnu++11" COMPILER_SUPPORTS_CXX11)
|
||||
if(COMPILER_SUPPORTS_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
Loading…
x
Reference in New Issue
Block a user