diff options
| author | Francois Budin <francois.budin@kitware.com> | 2018-04-27 11:14:47 -0400 |
|---|---|---|
| committer | Francois Budin <francois.budin@kitware.com> | 2018-04-27 13:00:41 -0400 |
| commit | 540a32c8413df21bc11aa714ff3086c9520fe6f5 (patch) | |
| tree | 988560be585cd4c6f5306fc56060109fc44e9870 /scripts/bootstrap.sh | |
| parent | da1805f3c0542d6c584eddf627b2ebc34d2ce64d (diff) | |
| download | vcpkg-540a32c8413df21bc11aa714ff3086c9520fe6f5.tar.gz vcpkg-540a32c8413df21bc11aa714ff3086c9520fe6f5.zip | |
Require the version of g++ to be at least 6
On Ubuntu 16.04, old versions of g++ such as 4.9 are available. Other
Linux distributions may also ship with g++ versions older than 5. With
the previous test, the bootstrap script was not failing fast and instead
was starting to compile vcpkg before it encountered the unsupported flag
-std=c++1z. The error message was not very explicit and that was making
it difficult to the developer to understand what the problem was. However,
when using g++ 5, an clear error message was printed to help the user.
This commit shows the helpful error message anytime g++ is older than
version 6.
Diffstat (limited to 'scripts/bootstrap.sh')
| -rw-r--r-- | scripts/bootstrap.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 95ee75af1..037a9136d 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -166,7 +166,7 @@ selectCXX() gccversion="$("$CXX" -v 2>&1)" gccversion="$(extractStringBetweenDelimiters "$gccversion" "gcc version " ".")" - if [ "$gccversion" = "5" ]; then + if [ "$gccversion" -lt "6" ]; then echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7." echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y" echo "sudo apt-get update -y" |
