From b573676a1b69f8cc16bd644b269134cc754edede Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 31 Mar 2016 11:26:38 +0200 Subject: [PATCH] Update CMakeLists.txt Enable c++11 support manually by using the compiler flags. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 160a1340a..1b2f12612 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,10 +70,12 @@ if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") endif() # hide all not-exported symbols - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall" ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -std=c++0x" ) elseif(MSVC) # enable multi-core compilation with MSVC add_compile_options(/MP) +elseif ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" ) endif() INCLUDE (FindPkgConfig)