Skip to content

Commit

Permalink
[Travis] Add testing with -std=c++20
Browse files Browse the repository at this point in the history
Also, bump default compiler to Clang 7, which supports C++20 to some
extent.
  • Loading branch information
ldionne committed Feb 11, 2019
1 parent a931d11 commit e307f49
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ matrix:
##########################################################################
# Build with variations in the configuration
##########################################################################
# With C++17 instead of C++14, on Clang
# With C++17, on Clang
- env: UNIT_TESTS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON"
addons: *defaults

# With C++17 instead of C++14, on GCC
# With C++20, on Clang
- env: UNIT_TESTS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON"
addons: *defaults

# With C++17, on GCC
- env: UNIT_TESTS=true COMPILER=g++-6 BOOST_VERSION=default CMAKE_OPTIONS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON"
addons: { apt: { packages: ["g++-6", "valgrind"], sources: ["ubuntu-toolchain-r-test"] } }

Expand Down Expand Up @@ -173,7 +177,7 @@ install:
############################################################################
# Setup default versions and override CXX set by Travis if needed
############################################################################
- if [[ "${COMPILER}" == "default" ]]; then COMPILER=clang++-5.0; fi
- if [[ "${COMPILER}" == "default" ]]; then COMPILER=clang++-7.0; fi
- if [[ "${BOOST_VERSION}" == "default" ]]; then BOOST_VERSION=1.66.0; fi

- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
Expand Down Expand Up @@ -234,7 +238,9 @@ install:
elif [[ "${CXX}" == "clang++-3.8" ]]; then LLVM_VERSION="3.8.1";
elif [[ "${CXX}" == "clang++-3.9" ]]; then LLVM_VERSION="3.9.1";
elif [[ "${CXX}" == "clang++-4.0" ]]; then LLVM_VERSION="4.0.1";
elif [[ "${CXX}" == "clang++-5.0" ]]; then LLVM_VERSION="5.0.1";
elif [[ "${CXX}" == "clang++-5.0" ]]; then LLVM_VERSION="5.0.2";
elif [[ "${CXX}" == "clang++-6.0" ]]; then LLVM_VERSION="6.0.1";
elif [[ "${CXX}" == "clang++-7.0" ]]; then LLVM_VERSION="7.0.1";
fi
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
Expand Down

0 comments on commit e307f49

Please sign in to comment.