Skip to content

Commit 3934d99

Browse files
committed
Make sure the g++ version is modern enough where it is available but not the default (such as old Ubuntu LTS).
1 parent 8148d3b commit 3934d99

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/jobs/configure-checks/setup_configure_image.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ case $distro_id in
1010
dnf install pkg-config make bats autoconf automake util-linux -y ;;
1111
*)
1212
apt-get update; apt-get full-upgrade -y
13+
# Install g++-12 to make sure we can use -std=c++20
14+
version=$(g++ -dumpversion 2>/dev/null | awk -F'.' '{print $1}' 2>/dev/null || echo 0); [ "${version}" -lt 12 ] && apt install -y g++-12
1315
apt-get install pkg-config make bats autoconf -y ;;
1416
esac
1517

0 commit comments

Comments
 (0)