diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8423fc11..1a992750 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,17 +10,19 @@ jobs: outputs: include: ${{ steps.set-matrix.outputs.include }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install cibuildwheel - run: pipx install cibuildwheel==2.12.0 + run: pipx install cibuildwheel==2.22.0 - id: set-matrix run: | MATRIX=$( { cibuildwheel --print-build-identifiers --platform linux \ | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos \ - | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 \ + | jq -nRc '{"only": inputs, "os": "macos-13"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch arm64 \ + | jq -nRc '{"only": inputs, "os": "macos-14"}' \ && cibuildwheel --print-build-identifiers --platform windows \ | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc @@ -35,21 +37,14 @@ jobs: matrix: include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }} steps: - - uses: actions/checkout@v3 - - # Used to host cibuildwheel - - uses: actions/setup-python@v3 - - - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.11.2 + - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.12.0 + uses: pypa/cibuildwheel@v2.22.0 with: - package-dir: ./ - output-dir: ./wheelhouse + only: ${{ matrix.only }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.only }} path: ./wheelhouse/*.whl - diff --git a/CMakeLists.txt b/CMakeLists.txt index a0c3f105..bfb16a36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,22 @@ if(MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2") # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /permissive /std:c++17") # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /permissive /std:c++17 /wd4068 /wd4305 /wd4267 /wd4244") + + if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(OpenMP_C_FLAGS "-Wno-unused-command-line-argument") + set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5") + set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES}) + set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES}) + set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES}) + endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(OpenMP_CXX_FLAGS "-Wno-unused-command-line-argument") + set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5") + set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES}) + endif() else() # Set O2 optimisations, the more stable option set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") diff --git a/src/_tmap/cereal/types/tuple.hpp b/src/_tmap/cereal/types/tuple.hpp index 7e56f0dc..4d793843 100644 --- a/src/_tmap/cereal/types/tuple.hpp +++ b/src/_tmap/cereal/types/tuple.hpp @@ -95,7 +95,7 @@ namespace cereal template inline static void apply( Archive & ar, std::tuple & tuple ) { - serialize::template apply( ar, tuple ); + serialize::template apply<>( ar, tuple ); ar( CEREAL_NVP_(tuple_element_name::c_str(), std::get( tuple )) ); } @@ -116,7 +116,7 @@ namespace cereal template inline void CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, std::tuple & tuple ) { - tuple_detail::serialize>::value>::template apply( ar, tuple ); + tuple_detail::serialize>::value>::template apply<>( ar, tuple ); } } // namespace cereal