From 295311135ce2f92255cb23105ef6392e228f7c69 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Thu, 20 Jun 2024 08:36:03 -0700 Subject: [PATCH 1/2] Set build flags for macOS --- .github/workflows/build-test.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 17006be3..d71cdab9 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -24,15 +24,8 @@ jobs: run: | # install dependencies brew install nlopt armadillo automake autoconf - # append $PATH - # examine the path before - echo "PATH BEFORE:" - echo ${PATH} - # add to the $PATH - echo "/opt/homebrew/" >> $GITHUB_PATH - # examine the path after - echo "PATH AFTER:" - echo ${PATH} + echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV + echo "CPPFLAGS=-I$(brew --prefix)/include" >> $GITHUB_ENV - name: Install apt dependencies if: runner.os == 'Linux' run: | From 28c55c849d9430ec2696328e82ebfcbf15480b75 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Thu, 20 Jun 2024 08:36:43 -0700 Subject: [PATCH 2/2] Don't set linker flags on build, only on link --- src/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index 28fe62c8..6608a0f8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -361,10 +361,10 @@ RATE_DEPS += \ #./state_reconstructor_simple.d \ main_%.o: ./main_%.cpp - $(CXX) $(CXXFLAGS) $(OPT_FLAGS) $(CPPFLAGS) $(LDFLAGS) -c -fmessage-length=0 -MMD -MP -MF "$(@:%.o=%.d)" -o "$@" "$<" + $(CXX) $(CXXFLAGS) $(OPT_FLAGS) $(CPPFLAGS) -c -fmessage-length=0 -MMD -MP -MF "$(@:%.o=%.d)" -o "$@" "$<" %.o: ./%.cpp ./%.h - $(CXX) $(CXXFLAGS) $(OPT_FLAGS) $(CPPFLAGS) $(LDFLAGS) -c -fmessage-length=0 -MMD -MP -MF "$(@:%.o=%.d)" -o "$@" "$<" + $(CXX) $(CXXFLAGS) $(OPT_FLAGS) $(CPPFLAGS) -c -fmessage-length=0 -MMD -MP -MF "$(@:%.o=%.d)" -o "$@" "$<" PROGS := pxaa2cdn pxbdsim pxboot pxbp pxcat pxclsq pxcltr pxcolt pxcomp pxconsq pxfqfilt pxlog pxlssq pxlstr pxmono pxmrca pxmrcacut pxmrcaname pxnw pxpoly pxrecode pxrevcomp pxrls pxrlt pxrmk pxrms pxrmt pxrr pxs2fa pxs2nex pxs2phy pxseqgen pxssort pxsstat pxsw pxt2new pxt2nex pxtcol pxtcomb pxtgen pxtlate pxtrt pxtscale pxvcf2fa $(NLOPT_PROGRAMS)