+ make an option to enable C++11 support for clang

This commit is contained in:
wmayer 2016-03-22 12:29:17 +01:00
parent 6453040cd8
commit ff0839184b

View File

@ -49,7 +49,11 @@ set(BOOST_MIN_VERSION 1.55)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_COMPILER_IS_CLANGXX TRUE)
# make this an option because for older compilers C++11 doesn't work properly.
OPTION(BUILD_ENABLE_CXX11 "Enable C++11 support." ON)
if (BUILD_ENABLE_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(BUILD_ENABLE_CXX11)
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)