From 57e3547fc0e652200916e3fd3f2e7bcfce124315 Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:12:48 +0800 Subject: [PATCH 1/3] CMake: Enable using precompiled header --- Project/CMake/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt index dcb2567..9068eb8 100644 --- a/Project/CMake/CMakeLists.txt +++ b/Project/CMake/CMakeLists.txt @@ -125,6 +125,10 @@ else() set(ZenLib_Unicode "no") endif() +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16") + target_precompile_headers(zen PRIVATE "${ZenLib_SOURCES_PATH}/ZenLib/PreComp.h") +endif() + FIND_PACKAGE(Threads) if(CMAKE_THREAD_LIBS_INIT) target_link_libraries(zen PUBLIC ${CMAKE_THREAD_LIBS_INIT}) From 41b729122ca98488f319eb7112ca903ea021d483 Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:55:53 +0800 Subject: [PATCH 2/3] CI: Add CMake --- .github/workflows/ZenLib_Checks.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ZenLib_Checks.yml b/.github/workflows/ZenLib_Checks.yml index 563b1d7..d88dd46 100644 --- a/.github/workflows/ZenLib_Checks.yml +++ b/.github/workflows/ZenLib_Checks.yml @@ -57,6 +57,29 @@ jobs: - name: Build run: msbuild -p:Configuration=Release -p:Platform=${{ matrix.architecture }} ${{ github.workspace }}\ZenLib\Project\MSVC2022\ZenLib_MSVC.sln -verbosity:quiet -warnaserror + CMake: + strategy: + matrix: + include: + - runner: windows-latest + CXXFLAGS: "/std:c++20 /WX /MP" + - runner: ubuntu-latest + CXXFLAGS: "-Werror" + - runner: macos-latest + CXXFLAGS: "-Werror" + fail-fast: false + name: CMake (${{ matrix.runner }}) + runs-on: ${{ matrix.runner }} + env: + CXXFLAGS: ${{ matrix.CXXFLAGS }} + steps: + - name: Checkout ZenLib + uses: actions/checkout@v5 + - name: Configure CMake project + run: cmake -S Project/CMake -B build -DCMAKE_BUILD_TYPE=Release + - name: Build CMake project + run: cmake --build build ${{ runner.os == 'Windows' && '--config Release' || '-j4' }} + MinGW: runs-on: windows-latest strategy: From bd585a290cd3de8cf6aa70f57bd78be72f621dee Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:55:59 +0800 Subject: [PATCH 3/3] CI: Update actions/checkout --- .github/workflows/ZenLib_Checks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ZenLib_Checks.yml b/.github/workflows/ZenLib_Checks.yml index d88dd46..499b599 100644 --- a/.github/workflows/ZenLib_Checks.yml +++ b/.github/workflows/ZenLib_Checks.yml @@ -13,7 +13,7 @@ jobs: CXXFLAGS: -Werror steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Dependencies run: | if [ "$RUNNER_OS" == "macOS" ]; then @@ -47,7 +47,7 @@ jobs: fail-fast: false steps: - name: Checkout ZenLib - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: path: ZenLib - name: Add msbuild to PATH @@ -74,7 +74,7 @@ jobs: CXXFLAGS: ${{ matrix.CXXFLAGS }} steps: - name: Checkout ZenLib - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Configure CMake project run: cmake -S Project/CMake -B build -DCMAKE_BUILD_TYPE=Release - name: Build CMake project @@ -96,7 +96,7 @@ jobs: CXXFLAGS: -Werror steps: - name: Checkout ZenLib - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup MSYS2 environment uses: msys2/setup-msys2@v2 with: