From 0fc549d8b82cb4c685031f7e1e1da77c42c1cf81 Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Fri, 3 May 2024 05:24:02 +0000 Subject: [PATCH 1/2] Reverts downgrade to c++11 Signed-off-by: Ethan Mahintorabi --- CMakeLists.txt | 6 +++++- Makefile | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cee9bc72fd..ce541b994b 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 3c81251cf7..aad66cb780 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 From 8afc83874f12c6d7027002db0337ee871580e964 Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Sat, 4 May 2024 01:13:09 +0000 Subject: [PATCH 2/2] add c++17 back to makefile for makefile only runs Signed-off-by: Ethan Mahintorabi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aad66cb780..0cc979b750 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ ifdef ABC_USE_LIBSTDCXX endif $(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS)) -CXXFLAGS += $(CFLAGS) +CXXFLAGS += $(CFLAGS) -std=c++17 SRC := GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags