chore: add CMake presets (#1181)

Add two presets (default and tidy).

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Henry Schreiner
2025-07-25 10:05:37 -04:00
committed by GitHub
parent 2a59b281f0
commit e351ddd522
2 changed files with 82 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
std: ["14", "17", "20","23"]
std: ["14", "17", "20", "23"]
precompile: ["ON", "OFF"]
steps:
- uses: actions/checkout@v4
@@ -61,6 +61,16 @@ jobs:
files: build/coverage.info
functionalities: fixes
preset:
name: Preset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run CMake Workflow
run: cmake --workflow default
catch2-3:
name: Catch 2 3.x
runs-on: macos-latest
@@ -92,14 +102,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install requirements
run: apt-get update && apt-get install -y ninja-build
- name: Configure
run: >
cmake -S . -B build -DCMAKE_CXX_STANDARD=20
-DCMAKE_CXX_CLANG_TIDY="$(which
clang-tidy);--use-color;--warnings-as-errors=*"
run: cmake --preset tidy
- name: Build
run: cmake --build build -j4 -- --keep-going
run: cmake --build --preset tidy
cuda11-build:
name: CUDA 11 build only
@@ -396,7 +406,7 @@ jobs:
cmake-version: "3.31"
args: -DCLI11_SANITIZERS=ON -DCLI11_BUILD_EXAMPLES_JSON=ON
if: success() || failure()
- name: Check CMake 4.0
uses: ./.github/actions/quick_cmake
with: