Skip to content

Commit

Permalink
Revert "move logic to cmake"
Browse files Browse the repository at this point in the history
This reverts commit e0abcac.
  • Loading branch information
jmoralez committed Nov 1, 2023
1 parent e0abcac commit 7e167c3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
CIBW_ARCHS: all
CIBW_TEST_SKIP: '*-macosx_arm64'
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD_MACOS: pip install toml && python scripts/disable_omp_arm64.py

- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
set(USE_OPENMP OFF)
endif()

set(CMAKE_CXX_STANDARD 17)
if(USE_OPENMP)
if(APPLE)
Expand Down
11 changes: 11 additions & 0 deletions scripts/disable_omp_arm64.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import platform

import toml


if platform.processor() == 'arm':
with open('pyproject.toml', 'rt') as f:
cfg = toml.load(f)
cfg['tool']['scikit-build']['cmake']['args'] = ['-DUSE_OPENMP=OFF']
with open('pyproject.toml', 'wt') as f:
toml.dump(cfg, f)

0 comments on commit 7e167c3

Please sign in to comment.