Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/ZenLib_Checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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@v6
- 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:
Expand All @@ -73,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:
Expand Down
4 changes: 4 additions & 0 deletions Project/CMake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down