Skip to content

Commit

Permalink
+ make an option to enable C++11 support for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Mar 22, 2016
1 parent 6453040 commit ff08391
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -49,7 +49,11 @@ set(BOOST_MIN_VERSION 1.55)

if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_COMPILER_IS_CLANGXX TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# 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)
Expand Down

0 comments on commit ff08391

Please sign in to comment.