From 1b241cd05ba05d9bc3a3de6b5ac8f7d5ba9b895b Mon Sep 17 00:00:00 2001 From: Isabell Pflug Date: Fri, 17 Apr 2026 12:36:25 +0200 Subject: [PATCH] :lock: Added failsafe to Makefile for c++ version. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index d82beea..e9ccfcd 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,13 @@ OUT_DIR := $(MAKEFILE_DIR)/out SOURCES := $(wildcard $(SRC_DIR)/*.cpp) TARGETS := $(patsubst $(SRC_DIR)/%.cpp,$(OUT_DIR)/%,$(SOURCES)) +# Teste ob Compiler C++23 kann +CXX23_SUPPORTED := $(shell echo 'int main(){}' | $(CXX) -std=c++23 -x c++ -o /dev/null - 2>/dev/null && echo yes) + +ifeq ($(CXX23_SUPPORTED),) +$(error Your compiler does not support C++23. Please update your system!) +endif + all: $(OUT_DIR) $(TARGETS) $(OUT_DIR):