From 6e806848ebe1c32053aa3bad5603139acce012b3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 12 Jan 2017 13:38:21 -0800 Subject: Use C++11 for alsoft-config --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 839bf183..3e608146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ INCLUDE(CheckIncludeFile) INCLUDE(CheckIncludeFiles) INCLUDE(CheckSymbolExists) INCLUDE(CheckCCompilerFlag) +INCLUDE(CheckCXXCompilerFlag) INCLUDE(CheckCSourceCompiles) INCLUDE(CheckTypeSize) include(CheckStructHasMember) @@ -115,6 +116,11 @@ ELSE() ENDIF() ENDIF() +CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD_CXX11) +IF(HAVE_STD_CXX11) + SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +ENDIF() + if(NOT WIN32) # Check if _POSIX_C_SOURCE and _XOPEN_SOURCE needs to be set for POSIX functions CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN_DEFAULT) -- cgit v1.2.3