Skip to content

Commit 207cb33

Browse files
committed
Fix cmake configure on windows
1 parent 842510c commit 207cb33

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,15 @@ jobs:
3030
run: |
3131
echo "CC=clang-18" >> $GITHUB_ENV
3232
echo "CXX=clang++-18" >> $GITHUB_ENV
33-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.compiler != 'native'}}
33+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.compiler != 'native' }}
3434

35-
- name: Use LLVM and Clang for Windows
36-
run: |
37-
echo "CC=clang" >> $GITHUB_ENV
38-
echo "CXX=clang++" >> $GITHUB_ENV
39-
if: ${{ matrix.os == 'windows-latest' && matrix.compiler != 'native'}}
35+
- name: Configure with Clang for Windows
36+
run: cmake -B build -DCPPSPEC_BUILD_TESTS=YES -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++"
37+
if: ${{ matrix.os == 'windows-latest' && matrix.compiler == 'llvm' }}
4038

4139
- name: Configure with default compiler
4240
run: cmake -B build -DCPPSPEC_BUILD_TESTS=YES
43-
if: ${{ matrix.compiler == 'native'}}
44-
45-
- name: Configure with specific compiler
46-
run: cmake -B build -DCPPSPEC_BUILD_TESTS=YES -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX"
47-
if: ${{ matrix.compiler != 'native'}}
41+
if: ${{ matrix.compiler == 'native' || matrix.os != 'windows-latest' }}
4842

4943
- name: Build
5044
run: cmake --build build --config Release

0 commit comments

Comments
 (0)