Skip to content

Commit 513cb14

Browse files
committed
Add env vars for macOS
1 parent 8e8f0c6 commit 513cb14

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,34 @@ jobs:
2020
- if: ${{ matrix.os == 'macos-latest' }}
2121
run:
2222
|
23-
brew install llvm libomp
23+
brew install llvm libomp gcc gfortran
24+
export PATH="/usr/local/opt/llvm/bin:$PATH"
25+
export LDFLAGS="-L/usr/local/opt/llvm/lib"
26+
export CPPFLAGS="-I/usr/local/opt/llvm/include"
2427
export CC=/usr/local/opt/llvm/bin/clang
2528

2629
- name: Setup
30+
env:
31+
|
32+
XCBASE:=$(shell xcrun --show-sdk-path)
33+
LLVMBASE:=$(shell brew --prefix llvm)
34+
GCCBASE:=$(shell brew --prefix gcc)
35+
GETTEXT:=$(shell brew --prefix gettext)
36+
37+
CC=$(LLVMBASE)/bin/clang -fopenmp
38+
CXX=$(LLVMBASE)/bin/clang++ -fopenmp
39+
CXX11=$(LLVMBASE)/bin/clang++ -fopenmp
40+
CXX14=$(LLVMBASE)/bin/clang++ -fopenmp
41+
CXX17=$(LLVMBASE)/bin/clang++ -fopenmp
42+
CXX1X=$(LLVMBASE)/bin/clang++ -fopenmp
43+
44+
CPPFLAGS=-isystem "$(LLVMBASE)/include" -isysroot "$(XCBASE)"
45+
LDFLAGS=-L"$(LLVMBASE)/lib" -L"$(GETTEXT)/lib" --sysroot="$(XCBASE)"
46+
47+
FC=$(GCCBASE)/bin/gfortran -fopenmp
48+
F77=$(GCCBASE)/bin/gfortran -fopenmp
49+
FLIBS=-L$(GCCBASE)/lib/gcc/9/ -lm
50+
2751
run:
2852
|
2953
python -m pip install --upgrade pip setuptools wheel

0 commit comments

Comments
 (0)