diff --git a/.github/workflows/trajoptlib-cpp.yml b/.github/workflows/trajoptlib-cpp.yml index 2acdc7839c..d3412f3e5d 100644 --- a/.github/workflows/trajoptlib-cpp.yml +++ b/.github/workflows/trajoptlib-cpp.yml @@ -58,7 +58,7 @@ jobs: # sccache doesn't work with MSBuild if: ${{ !startsWith(matrix.os, 'windows') }} - - run: cmake --preset with-examples-sccache ${{ matrix.cmake-args }} + - run: cmake --preset with-examples-and-sccache ${{ matrix.cmake-args }} if: ${{ !startsWith(matrix.os, 'windows') }} working-directory: trajoptlib - run: cmake -B build -S . -DBUILD_EXAMPLES=ON ${{ matrix.cmake-args }} diff --git a/.github/workflows/trajoptlib-sanitizers.yml b/.github/workflows/trajoptlib-sanitizers.yml index b368e00dbc..8dc8c8da77 100644 --- a/.github/workflows/trajoptlib-sanitizers.yml +++ b/.github/workflows/trajoptlib-sanitizers.yml @@ -37,7 +37,7 @@ jobs: - name: Set up sccache uses: mozilla-actions/sccache-action@v0.0.5 - - run: cmake --preset with-examples-sccache ${{ matrix.cmake-args }} + - run: cmake --preset with-examples-and-sccache ${{ matrix.cmake-args }} working-directory: trajoptlib - run: cmake --build build --config RelWithDebInfo --parallel $(nproc) working-directory: trajoptlib diff --git a/trajoptlib/CMakePresets.json b/trajoptlib/CMakePresets.json index 34c8075737..5b98ac0c4f 100644 --- a/trajoptlib/CMakePresets.json +++ b/trajoptlib/CMakePresets.json @@ -15,7 +15,7 @@ "cacheVariables": {} }, { - "name": "sccache", + "name": "with-sccache", "displayName": "", "description": "Ninja config with sccache", "generator": "Ninja", @@ -36,14 +36,13 @@ } }, { - "name": "with-examples-sccache", + "name": "with-examples-and-sccache", "displayName": "", "description": "Ninja config with sccache", "generator": "Ninja", "binaryDir": "build", + "inherits": "with-sccache", "cacheVariables": { - "CMAKE_C_COMPILER_LAUNCHER": "sccache", - "CMAKE_CXX_COMPILER_LAUNCHER": "sccache", "BUILD_EXAMPLES": "ON" } }