From 49c2381d862bb5beb23781255ef077a1ee6117e6 Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Wed, 29 Nov 2023 16:43:30 -0700 Subject: [PATCH] fix version to compare apple clang to --- Makefile | 2 +- test/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 49e2888..1e36f7e 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ CPPFLAGS += -MMD -MP COMPILER_VERSION := $(shell $(CXX) --version | grep version | grep -o -m 1 "[0-9]\+\.[0-9]\+\.*[0-9]*" | head -n 1) COMPILER_VERSION_NUMBER := $(shell echo $(COMPILER_VERSION) | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/') -CLANG_13_OR_MORE := $(shell expr $(COMPILER_VERSION_NUMBER) \>= 130000) +CLANG_13_OR_MORE := $(shell expr $(COMPILER_VERSION_NUMBER) \>= 130106) ifneq ($(CLANG_13_OR_MORE),0) # supported: c++11, c++14, c++17, c++20 # future: c++2b diff --git a/test/Makefile b/test/Makefile index 828d5c6..33bb4ff 100644 --- a/test/Makefile +++ b/test/Makefile @@ -13,7 +13,7 @@ BREW_PREFIX := $(shell /usr/bin/env -P /usr/local/bin:/opt/homebrew/bin brew -- COMPILER_VERSION := $(shell $(CXX) --version | grep version | grep -o -m 1 "[0-9]\+\.[0-9]\+\.*[0-9]*" | head -n 1) COMPILER_VERSION_NUMBER := $(shell echo $(COMPILER_VERSION) | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/') -CLANG_13_OR_MORE := $(shell expr $(COMPILER_VERSION_NUMBER) \>= 130000) +CLANG_13_OR_MORE := $(shell expr $(COMPILER_VERSION_NUMBER) \>= 130106) ifneq ($(CLANG_13_OR_MORE),0) CXXFLAGS := --std=c++20 # supported: c++11, c++14, c++17, c++20