fix: correct C++ compiler naming in CI (clang++-16 not clang-16++)
CI / build-and-test (push) Failing after 34s
CI / build-and-test (push) Failing after 34s
Clang installs the C++ compiler as clang++-16, not clang-16++. Use sed to properly transform the C compiler path.
This commit is contained in:
@@ -40,8 +40,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
CC=$(find /usr/bin -maxdepth 1 \( -name 'clang-1[5-9]' -o -name 'clang-2[0-9]' \) 2>/dev/null | head -1)
|
CC=$(find /usr/bin -maxdepth 1 \( -name 'clang-1[5-9]' -o -name 'clang-2[0-9]' \) 2>/dev/null | head -1)
|
||||||
if [ -z "$CC" ]; then CC=/usr/bin/clang-18; fi
|
if [ -z "$CC" ]; then CC=/usr/bin/clang-18; fi
|
||||||
CXX="${CC}++"
|
CXX=$(echo "$CC" | sed 's/clang-/clang++-/')
|
||||||
echo "Using compiler: $CXX"
|
echo "CC=$CC CXX=$CXX"
|
||||||
cmake -B build -G Ninja \
|
cmake -B build -G Ninja \
|
||||||
-DCMAKE_C_COMPILER="$CC" \
|
-DCMAKE_C_COMPILER="$CC" \
|
||||||
-DCMAKE_CXX_COMPILER="$CXX"
|
-DCMAKE_CXX_COMPILER="$CXX"
|
||||||
|
|||||||
Reference in New Issue
Block a user