From 2e23fb203a425c0bbbe93dd462e44727739183a6 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sat, 12 Sep 2015 16:16:18 +0200 Subject: [PATCH] Pass -std=c++11 to the C++ compiler unconditionally. All supported compiler should understand it. --- CMakeLists.txt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93dd2b342..ec4597638 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,17 +114,7 @@ if(WITH_LTO) endif() endif() -check_cxx_compiler_flag("-std=c++11" CXX11_AVAILABLE) -if (CXX11_AVAILABLE) - add_gcc_compiler_cxxflags("-std=c++11") -else() - check_cxx_compiler_flag("-std=c++0x" CXX0X_AVAILABLE) - if(CXX0X_AVAILABLE) - add_gcc_compiler_cxxflags("-std=c++0x") - else() - message(FATAL_ERROR "Compiler doesn't support C++11") - endif() -endif() +add_gcc_compiler_cxxflags("-std=c++11") if(APPLE) add_gcc_compiler_cxxflags("-stdlib=libc++")