Changed: Use CPP11 everywhere if supported

--HG--
branch : develop
hg/compatibility-develop
kervala 6 years ago
parent 1f897f6106
commit 4444e93bf7

@ -209,8 +209,8 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(USE_CPP0X AND gcc_compiler_version GREATER "6.2.0") IF(CMAKE_CXX11_EXTENSION_COMPILE_OPTION)
LIST(APPEND _FLAGS "-std=gnu++11") LIST(APPEND _FLAGS ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION})
ENDIF() ENDIF()
# Format definitions # Format definitions

@ -874,7 +874,9 @@ MACRO(NL_SETUP_BUILD)
ENDIF() ENDIF()
# use c++0x standard to use std::unique_ptr and std::shared_ptr # use c++0x standard to use std::unique_ptr and std::shared_ptr
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -std=c++0x") IF(CMAKE_CXX11_EXTENSION_COMPILE_OPTION)
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}")
ENDIF()
ADD_PLATFORM_FLAGS("-D_REENTRANT") ADD_PLATFORM_FLAGS("-D_REENTRANT")

Loading…
Cancel
Save