set C++11/C++0X depends on compiler

* almost the last changes need c++11 standard, this is c++0x in olders
* build in jsoncpp need it to compile
This commit is contained in:
Герхард PICCORO Lenz McKAY 2021-11-29 09:31:32 -04:00
parent 2e12ab8aff
commit 4ef3bc602f

View File

@ -695,7 +695,12 @@ if(MSVC)
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MD") set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MD")
else() else()
# GCC or compatible compilers such as Clang # GCC or compatible compilers such as Clang
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
if(WARN_ALL) if(WARN_ALL)
set(RELEASE_WARNING_FLAGS "-Wall") set(RELEASE_WARNING_FLAGS "-Wall")
else() else()