From de03c2f7ff97b21a6912f040c69db545e81b7482 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 15 Feb 2017 04:00:37 -0700 Subject: [PATCH] CMake: Use gnu++* instead of c++* This is for consistency with the CMake 3.1+ behavior and allows the use of GNU extensions. Thanks @rdb! --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 558dcbff1b..1d36d8624d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,11 +10,11 @@ enable_testing() # the box; for older versions we take a shot in the dark: if(CMAKE_VERSION VERSION_LESS "3.1") include(CheckCXXCompilerFlag) - check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11) + check_cxx_compiler_flag("-std=gnu++11" COMPILER_SUPPORTS_CXX11) if(COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x") endif() else() set(CMAKE_CXX_STANDARD 11)