Skip to content

Commit 7ff84d2

Browse files
committed
fix: compilation flags
1 parent be2f68d commit 7ff84d2

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/external-use.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
run: |
6666
brew update
6767
brew install libomp
68+
LIBOMP_PREFIX="$(brew --prefix libomp)"
6869
mkdir -p ~/.R
6970
# Detect architecture for correct optimization flags
7071
case "$(uname -m)" in
@@ -76,10 +77,10 @@ jobs:
7677
;;
7778
esac
7879
cat >> ~/.R/Makevars <<EOF
79-
CFLAGS += ${ARCH_FLAGS} -g -O3 -flto=thin -ffp-contract=fast -DNDEBUG -Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include
80-
CXXFLAGS += ${ARCH_FLAGS} -g -O3 -flto=thin -ffp-contract=fast -DNDEBUG -Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include
81-
CPPFLAGS += -I/opt/homebrew/include
82-
LDFLAGS += -flto=thin -L/opt/homebrew/lib -L$(brew --prefix libomp)/lib -lomp
80+
CPPFLAGS += -I${LIBOMP_PREFIX}/include
81+
CFLAGS += ${ARCH_FLAGS} -g -O3 -flto=thin -ffp-contract=fast -DNDEBUG -Xpreprocessor -fopenmp
82+
CXXFLAGS += ${ARCH_FLAGS} -g -O3 -flto=thin -ffp-contract=fast -DNDEBUG -Xpreprocessor -fopenmp
83+
LDFLAGS += -flto=thin -L${LIBOMP_PREFIX}/lib -lomp
8384
EOF
8485
- name: Install dependencies (Windows)
8586
if: contains(matrix.os, 'windows')

0 commit comments

Comments
 (0)