detect clnag compiler properly

This commit is contained in:
orignal
2026-08-16 08:12:19 -04:00
parent 8e868b3abb
commit 7dae8cfcc4
+3 -2
View File
@@ -9,10 +9,11 @@ LDFLAGS ?= ${LD_DEBUG}
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
## custom FDLAGS to work at build-time.
# detect proper flag for c++20 support by compilers
# detect proper flag for c++20/с++23 support by compilers
CXXVER := $(shell $(CXX) -dumpversion)
ifeq ($(shell expr match $(CXX) 'clang'),5)
ifneq ($(findstring clang,$(CXX)),)
NEEDED_CXXFLAGS += -std=c++20
LDLIBS = -lboost_json
else ifeq ($(shell expr match ${CXXVER} "10"),2) # gcc 10
# for Debian 11
NEEDED_CXXFLAGS += -std=c++17