enable c++11

This commit is contained in:
Patrick von Reth 2014-09-19 13:50:25 +02:00
parent dddc425b78
commit ec69ce843e
1 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,20 @@ include(GNUInstallDirs)
include(GenerateExportHeader)
include(FeatureSummary)
if(NOT MSVC)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag( "-std=c++11" CXX11_FOUND )
check_cxx_compiler_flag( "-std=c++0x" CXX0X_FOUND )
if(CXX11_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(CXX0X_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "${CMAKE_CXX_COMPILER} does not support C++11, please use a different compiler")
endif()
endif()
#######################################################################
option(WITH_FRONTENDS "Build frontends currently only useful if WITH_SNORE_DEAMON=ON" OFF)