From 358bd026e30479904c4721d0c84bde19ea31a013 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 29 Jan 2021 21:34:44 +0100 Subject: Support C++17 --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6bc26a8..31af4e2 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,19 @@ CXX=clang++-11 #CXX=g++-10 +STANDARD=c++17 +#STANDARD=c++20 + CXXFLAGS=-O0 -g -D_DEBUG #CXXFLAGS=-O2 -DNDEBUG -CXXFLAGS+=-Wall -Iinclude -std=c++20 +CXXFLAGS+=-Wall -Iinclude -std=$(STANDARD) ifeq ($(CXX),clang++-11) +COMPILER_SUITE=clang +endif + +ifeq ($(COMPILER_SUITE),clang) CXXFLAGS+=-stdlib=libc++ endif @@ -16,7 +23,7 @@ LDLIBS+=\ -lboost_timer \ -lboost_system \ -ifeq ($(CXX),clang++-11) +ifeq ($(COMPILER_SUITE),clang) LIBS+= \ -fuse-ld=lld-11 \ -lc++ \ -- cgit v1.2.3