Skip to content

Commit 4a9bbbf

Browse files
committed
tooling: Ensure minimum GCC version of 8
1 parent 47cec67 commit 4a9bbbf

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile.setup

+10
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ APT := $(or \
2222
$(shell command -v apt-get 2>/dev/null) \
2323
)
2424
APT_ARGS := --no-install-recommends -y
25+
UBUNTU_VERSION := $(shell source /etc/os-release && echo $$VERSION_ID)
2526

2627
PIP := $(or \
2728
$(shell command -v pip3 2>/dev/null), \
@@ -122,6 +123,15 @@ install-ubuntu-deps::
122123
tmux \
123124
;
124125

126+
# Require GCC and G++ version >= 8
127+
if [ "${UBUNTU_VERSION}" == "18.04" ]; then \
128+
${APT} install ${APT_ARGS} gcc-8 g++-8; \
129+
if [ $$(readlink /usr/bin/g++) == "g++-7" ]; then \
130+
ln -sf /usr/bin/g++-8 /usr/bin/g++ && \
131+
ln -sf /usr/bin/gcc-8 /usr/bin/gcc; \
132+
fi; \
133+
fi
134+
125135
# Python ----------------------------------------------------------------------
126136
.PHONY: install-python-deps
127137
install-python-deps::

docs/install.rst

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ straightforward.
88

99
Currently, we only officially support Linux or `WSL`_.
1010

11+
The minimum required C++ standard is 17, which is provided by a minimum
12+
GCC version of 8. This is available from Ubuntu 18.04.
13+
1114
Install Dependencies
1215
--------------------
1316
We provide automatic dependency installation for `Ubuntu`_ from 18.04 to 22.04

0 commit comments

Comments
 (0)