Automatically use C++11 features when available and remove USE_CXX11 flag

This commit is contained in:
sfan5
2016-10-06 00:08:27 +02:00
parent 13b485a75f
commit 877b514971
6 changed files with 4 additions and 26 deletions

View File

@ -13,14 +13,6 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build.")
endif()
option(USE_CXX11 "Use C++11" FALSE)
if(USE_CXX11)
set(CMAKE_CXX_FLAGS "-std=c++11")
set(USE_CXX11 1) # We use this in config.h, it needs to be a valid value
else(USE_CXX11)
set(USE_CXX11 0)
endif(USE_CXX11)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2 -Wall")