From 7c4ecdf073ab47de0bd26e399dae262eac0abae3 Mon Sep 17 00:00:00 2001 From: Aaron Kollasch Date: Sat, 14 Jan 2023 03:15:25 -0500 Subject: [PATCH] Remove need to link libomp with homebrew --- .github/workflows/main.yml | 5 ++++- makefile | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca19d47..a94364f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,10 +33,13 @@ jobs: submodules: 'recursive' - name: Install prerequisites + env: + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | case ${{ matrix.job.target }} in *-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install libomp-dev ;; - *-apple-darwin) brew update --preinstall ; env HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc libomp; brew link libomp --force ;; + *-apple-darwin) brew install gcc libomp; ;; esac - name: Compile default diff --git a/makefile b/makefile index 50934a8..e87f4a7 100644 --- a/makefile +++ b/makefile @@ -28,9 +28,9 @@ all-mac32: clang $(SOURCES) -o bin/plmc $(CLANGFLAGS) -D USE_FLOAT # If using homebrew for openMP (libomp) -all-mac-openmp: BREW_PREFIX=$(shell brew --prefix) +all-mac-openmp: LIBOMP_PREFIX=$(shell brew --prefix libomp) all-mac-openmp: - $(CC) $(SOURCES) -o bin/plmc -Xpreprocessor -fopenmp $(GCCFLAGS) -lomp -L$(BREW_PREFIX)/lib/ -I$(BREW_PREFIX)/include/ + $(CC) $(SOURCES) -o bin/plmc -Xpreprocessor -fopenmp $(GCCFLAGS) -lomp -L$(LIBOMP_PREFIX)/lib/ -I$(LIBOMP_PREFIX)/include/ clean: rm -rf bin/*