From 34ed304985ea158f9bd690c8cd826b1e72cea93a Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Wed, 22 Jan 2025 11:40:34 +0000 Subject: [PATCH] TEST: Need -fexperimental-library on macOS --- test/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/Makefile b/test/Makefile index 11f47d1..00f7fdf 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,6 +4,8 @@ include ${FSLCONFDIR}/default.mk PROJNAME = test-newimage TESTXFILES = test-newimage +all: ${TESTXFILES} + LIBS = -lfsl-newimage -lfsl-miscmaths -lfsl-NewNifti \ -lfsl-cprob -lfsl-utils -lfsl-znz -lboost_unit_test_framework -lpthread @@ -28,16 +30,16 @@ ifeq ($(SYSTYPE), Darwin) RPATH := -Wl,-rpath,'@executable_path/..' endif -all: ${TESTXFILES} +USRCXXFLAGS = -I.. + +# Need this flag to enable std::execution +# policies in clang +ifeq ($(SYSTYPE), Darwin) +USRCXXFLAGS += -fexperimental-library +endif OBJS := $(wildcard test_*.cc) OBJS := $(OBJS:%.cc=%.o) -# We add -I.., -L.., -Wl,-rpath so that -# in-source builds take precedence over -# $FSLDEVDIR/$FSLDIR -%.o: %.cc - $(CXX) -I.. ${CXXFLAGS} -c -o $@ $< - test-newimage: ${OBJS} - $(CXX) -o $@ $^ -L.. ${RPATH} ${LDFLAGS} + $(CXX) ${CXXFLAGS} -o $@ $^ -L.. ${RPATH} ${LDFLAGS} -- GitLab