From 548ef99a090aa41d6e370e15cd94a8f70f0a1fea Mon Sep 17 00:00:00 2001 From: Isabell Pflug Date: Fri, 17 Apr 2026 16:50:28 +0200 Subject: [PATCH] :pushpin: Fixed openmp check in Makefile. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 217e991..db55b2c 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,11 @@ PROJECTS := $(wildcard $(SRC_DIR)/*) BINS := $(patsubst $(SRC_DIR)/%, $(OUT_DIR)/%, $(PROJECTS)) LIB_SOURCES := $(wildcard $(LIB_DIR)/*.cpp) +# checking with a silly test program whether openmp is accessible +# maybe at some point a cmake file would be more elegant. OPENMP_FLAG := -OPENMP_CHECK := $(shell echo | $(CXX) -fopenmp -x c++ - -o /dev/null 2>/dev/null && echo yes) +OPENMP_CHECK := $(shell printf '#include \nint main(){return 0;}' | \ + $(CXX) -std=c++23 -fopenmp -x c++ - -o /dev/null 2>/dev/null && echo yes) ifeq ($(OPENMP_CHECK),yes) OPENMP_FLAG := -fopenmp