Skip to content

Commit

Permalink
Minor CMake fix and pin delvewheel
Browse files Browse the repository at this point in the history
  • Loading branch information
sameeul committed Aug 27, 2024
1 parent 817195f commit 071d04a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
python -m pip install cibuildwheel==2.16.2 delvewheel==1.7.1 wheel
- name: Building wheels
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
python -m pip install cibuildwheel==2.16.2 delvewheel==1.7.1 wheel
- name: Building wheels
run: |
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ include_directories(lib/pugixml)

find_package(Threads QUIET)
if (Threads_FOUND)
if (CMAKE_USE_PTHREADS_INIT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif (CMAKE_USE_PTHREADS_INIT)
if (CMAKE_USE_PTHREADS_INIT)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /pthread")
endif()
endif (CMAKE_USE_PTHREADS_INIT)
list(APPEND Build_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
else ()
message(STATUS "Unable to find threads. bfio_cpp must have a threading library i.e. pthreads.")
Expand Down

0 comments on commit 071d04a

Please sign in to comment.