Skip to content

Commit 5b39537

Browse files
committed
Set proper linker flags for each version of macOS
1 parent daba3d8 commit 5b39537

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/full-openmpi.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ jobs:
8080
runs-on: macos-${{ matrix.version }}
8181

8282
env:
83-
CXX: "g++ -Wl,-ld_classic -Wl,-commons,use_dylibs -Wno-unused-command-line-argument"
8483
MPIRUN: mpirun
8584
MPICC: mpicc
8685
MPICXX: mpicxx
@@ -99,7 +98,17 @@ jobs:
9998

10099
# - name: Setup tmate session
101100
# uses: mxschmitt/action-tmate@v3
102-
101+
102+
- name: Set linker flags based on macOS version
103+
run: |
104+
if [ "${{ matrix.version }}" == "13" ]; then
105+
echo "CXX=g++ -Wl,-ld_classic -Wno-unused-command-line-argument" >> $GITHUB_ENV
106+
elif [ "${{ matrix.version }}" == "14" ]; then
107+
echo "CXX=g++ -Wl,-ld_classic -Wl,-commons,use_dylibs -Wno-unused-command-line-argument" >> $GITHUB_ENV
108+
elif [ "${{ matrix.version }}" == "15" ]; then
109+
echo "CXX=g++ -Wl,-commons,use_dylibs -Wno-unused-command-line-argument" >> $GITHUB_ENV
110+
fi
111+
103112
- name: Configure
104113
run: |
105114
autoreconf -i

0 commit comments

Comments
 (0)