From e949e229ef21a34f770840bbfe48505955df3bd9 Mon Sep 17 00:00:00 2001 From: Jon Tamir Date: Fri, 28 Jun 2024 17:08:03 -0500 Subject: [PATCH] fix broken macports build with gcc --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 9ffdc6331..50d4d4a52 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,8 @@ endif ifeq ($(BUILDTYPE), MacOSX) MACPORTS ?= 1 +else + MACPORTS ?= 0 endif @@ -460,9 +462,15 @@ CFLAGS += -fopenmp CXXFLAGS += -fopenmp NVCCFLAGS += -Xcompiler -fopenmp else +ifeq ($(MACPORTS),1) +CFLAGS += -fopenmp +CXXFLAGS += -fopenmp +NVCCFLAGS += -Xcompiler -fopenmp +else LDFLAGS += "-L/usr/local/opt/libomp/lib" -lomp CPPFLAGS += "-I/usr/local/opt/libomp/include" -Xclang -fopenmp endif +endif else CFLAGS += -Wno-unknown-pragmas CXXFLAGS += -Wno-unknown-pragmas