Pass -std=c++11 to the C++ compiler unconditionally.

All supported compiler should understand it.
This commit is contained in:
Felix Geyer 2015-09-12 16:16:18 +02:00
parent 625e9a2547
commit 2e23fb203a

View File

@ -114,17 +114,7 @@ if(WITH_LTO)
endif() endif()
endif() endif()
check_cxx_compiler_flag("-std=c++11" CXX11_AVAILABLE)
if (CXX11_AVAILABLE)
add_gcc_compiler_cxxflags("-std=c++11") 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()
if(APPLE) if(APPLE)
add_gcc_compiler_cxxflags("-stdlib=libc++") add_gcc_compiler_cxxflags("-stdlib=libc++")