Skip to content

Commit ab6f2f0

Browse files
lunacddcbaker
authored andcommitted
Make CMake presets toolchain independent
1 parent 07e2333 commit ab6f2f0

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
strategy:
3030
matrix:
3131
cfg:
32-
- { id: ubuntu-gcc, platform: ubuntu, preset: default }
33-
- { id: ubuntu-gcc-fetch, platform: ubuntu, preset: fetch-deps }
32+
- { id: ubuntu-gcc, platform: ubuntu, preset: default, cc: gcc, cxx: g++ }
33+
- { id: ubuntu-gcc-fetch, platform: ubuntu, preset: fetch-deps, cc: gcc, cxx: g++ }
3434

3535
steps:
3636
- uses: actions/checkout@v2
@@ -67,7 +67,8 @@ jobs:
6767
docker exec \
6868
-e CCACHE_DIR="/ccache" \
6969
${{ matrix.cfg.id }} \
70-
bash -c "cmake -S /workdir -B /build/ --preset ${{ matrix.cfg.preset }} && \
70+
bash -c "CC=${{ matrix.cfg.cc }} CXX=${{ matrix.cfg.cxx }} \
71+
cmake -S /workdir -B /build/ --preset ${{ matrix.cfg.preset }} && \
7172
cmake --build build --config RelWithDebInfo"
7273
- name: Run Tests
7374
run: |

CMakePresets.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
"cacheVariables": {
88
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
99
"BUILD_TESTING": true
10-
},
11-
"environment": {
12-
"CC": "gcc",
13-
"CXX": "g++"
1410
}
1511
},
1612
{

0 commit comments

Comments
 (0)