Skip to content

Commit a4f744c

Browse files
committed
Use C++ compiler for CMAKE_CXX_COMPILER env variable
1 parent c169628 commit a4f744c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/build-linux.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
libc: musl
2626
gcc_install: clang lld
2727
gcc: clang
28+
gxx: clang++
2829
# libc is intentionally not set here, as prebuild-install requires libc to not be set for glibc builds
2930
- triple: "linux-gnu"
3031
platform: debian
@@ -48,17 +49,20 @@ jobs:
4849
platform: debian
4950
gcc_install: gcc g++
5051
gcc: gcc
52+
gxx: g++
5153
- arch: arm64
5254
platform: debian
5355
gcc_install: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
5456
gcc: aarch64-linux-gnu-gcc
57+
gxx: aarch64-linux-gnu-g++
5558
# debian uses the triple `arm-linux-gnueabihf` instead of alpine's `armv7-alpine-linux-musleabihf`
5659
# because of this, we explicitly override triple_arch for debian arm
5760
- triple_arch: arm
5861
arch: arm
5962
platform: debian
6063
gcc_install: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
6164
gcc: arm-linux-gnueabihf-gcc
65+
gxx: arm-linux-gnueabihf-g++
6266

6367
steps:
6468
- uses: actions/checkout@v4

cmake/toolchain/ci.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(triple $ENV{TRIPLE})
33

44
# use clang and lld
55
set(CMAKE_C_COMPILER $ENV{GCC})
6-
set(CMAKE_CXX_COMPILER $ENV{GCC})
6+
set(CMAKE_CXX_COMPILER $ENV{GXX})
77
if (CMAKE_C_COMPILER MATCHES clang)
88
add_link_options("-fuse-ld=lld")
99
endif()

0 commit comments

Comments
 (0)