diff --git a/CMakeLists.txt b/CMakeLists.txt index cee9bc72f..ce541b994 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,13 @@ -cmake_minimum_required(VERSION 3.3.0) +cmake_minimum_required(VERSION 3.5.0) include(CMakeParseArguments) include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) +# Default c++ standard used unless otherwise specified in target_compile_features. +set(CMAKE_CXX_STANDARD 17 CACHE STRING "the C++ standard to use for this project") +set(CMAKE_CXX_STANDARD_REQUIRED ON) + function(addprefix var prefix) foreach( s ${ARGN} ) list(APPEND tmp "-I${s}") diff --git a/Makefile b/Makefile index 3c81251cf..aad66cb78 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ ifdef ABC_USE_LIBSTDCXX endif $(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS)) -CXXFLAGS += $(CFLAGS) -std=c++11 +CXXFLAGS += $(CFLAGS) SRC := GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags