From cafa5de8ac6610fae419c8e012a77d329f440931 Mon Sep 17 00:00:00 2001 From: Ruoxi Date: Fri, 12 Jul 2024 16:00:25 +0800 Subject: [PATCH] Fix CI compilation on Windows and Mac. (#48) * Revert "only compile linux" This reverts commit e263eeff26a1c269c360edd6b220bbb022e871a7. * Bump OSX version and add windows compile option. --- .github/workflows/wheel.yml | 13 ++++--------- CMakeLists.txt | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 4208e5f..980d627 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -10,9 +10,9 @@ jobs: matrix: config: - { os: "ubuntu-20.04", arch: "auto64" } - # - { os: "windows-2019", arch: "auto64" } - # - { os: "macos-11", arch: "auto64" } - # - { os: "macos-11", arch: "universal2" } + - { os: "windows-2019", arch: "auto64" } + - { os: "macos-12", arch: "auto64" } + - { os: "macos-12", arch: "universal2" } steps: - uses: actions/checkout@v2 with: @@ -20,10 +20,6 @@ jobs: - name: Install Dependencies run: | python3 -m pip install wheel - - name: Set CXXFLAGS for Windows - if: matrix.config.os == 'windows-2019' - run: | - set CXXFLAGS=/bigobj - name: Build Wheels uses: pypa/cibuildwheel@v2.17.0 env: @@ -44,8 +40,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - #, windows-2019, macos-11] + os: [ubuntu-20.04, windows-2019, macos-12] python-version: ['3.6', '3.11'] steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bd3ccd..d2685a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ else() endif() if (MSVC) + add_compile_options("/bigobj") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W0 -fpermissive -D_USE_MATH_DEFINES") set(CMAKE_SHARED_LIBRARY_PREFIX "lib") else()