diff options
| author | Henrik S. Gaßmann <[email protected]> | 2023-05-11 11:26:38 +0200 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2023-05-23 14:48:45 -0700 |
| commit | 4bb04665791e9bb1f23ecf198dbfc48dba3cc849 (patch) | |
| tree | b71167be03e1190e119e32210a62eb18ec138e26 /.github/workflows/ci.yml | |
| parent | 2dd4e57f68d85f3983b1880b66250fc7bdf0b7c8 (diff) | |
Refactor CMake buildsystem to be portable and modern
Aggreggate source files directly in the target instead of a proxy
variable.
Install CMake package config files in order to allow the project to be
found via `find_package()` by dependents.
Replace hard coded SIMD compiler flags with configurable options. Retain
the current GCC/Clang flags as defaults for these compilers. Add default
SIMD compiler flags for MSVC.
Remove hard coded compiler flags (including -fPIC). These are not
portable and should be set by the toolchain file or on the CLI.
- Guard ASM sources with triplet compatibility checks.
- Remove the `BLAKE3_STATIC` option in favor of [`BUILD_SHARED_LIBS`].
[`BUILD_SHARED_LIBS`]: https://cmake.org/cmake/help/v3.9/variable/BUILD_SHARED_LIBS.html
Diffstat (limited to '.github/workflows/ci.yml')
| -rw-r--r-- | .github/workflows/ci.yml | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06cbaa7..603a82b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,17 +278,23 @@ jobs: # CMake build test (Library only), current macOS/Linux only. cmake_build: - name: CMake ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest", "macOS-latest"] - steps: + name: CMake ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "macOS-latest", "windows-latest"] + compiler: [gcc, clang, cl] + exclude: + - os: windows-latest + compiler: gcc + - os: ubuntu-latest + compiler: msvc + - os: macOS-latest + compiler: msvc + steps: - uses: actions/checkout@v3 - name: CMake generation - run: cmake . -Bbuild - working-directory: ./c - - name: CMake build - run: cmake --build build/ - working-directory: ./c + run: cmake -S c -B c/build -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/target + - name: CMake build / install + run: cmake --build c/build --target install |
