Skip to content

Commit 06369b5

Browse files
committed
Fix missing OpenMP support with Python 3.13
1 parent f45b7a4 commit 06369b5

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v5
24+
- name: Install OpenMP on macOS
25+
if: contains(matrix.os, 'macos')
26+
run: brew install libomp
2427
- name: Set up Python ${{ matrix.python-version }}
2528
id: setup-python
2629
uses: actions/setup-python@v6
@@ -34,6 +37,16 @@ jobs:
3437
installer-parallel: true
3538
- name: Install dependencies
3639
run: poetry install --no-interaction --no-root
40+
if: contains(matrix.os, 'macos')
41+
env:
42+
CPPFLAGS: -I/opt/homebrew/opt/libomp/include
43+
LDFLAGS: -L/opt/homebrew/opt/libomp/lib
44+
CFLAGS: -Xpreprocessor -fopenmp
45+
CXXFLAGS: -Xpreprocessor -fopenmp
46+
CMAKE_ARGS: >
47+
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp"
48+
-DOpenMP_C_LIB_NAMES=omp
49+
-DOpenMP_omp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib
3750
- name: Install machine
3851
run: poetry install --no-interaction
3952
- name: Lint with Black

0 commit comments

Comments
 (0)