Skip to content

Commit

Permalink
Fix travis configuration to enable C++17 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karzhenkov committed Dec 20, 2020
1 parent 8247a21 commit aae0e49
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ matrix:
compiler: gcc
env:
- COMPILER=g++-9
- CXXFLAGS=-std=c++2a
- CXX_STANDARD=17
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
Expand Down Expand Up @@ -294,7 +294,7 @@ matrix:
compiler: clang
env:
- COMPILER=clang++-7
- CXXFLAGS=-std=c++1z
- CXX_STANDARD=17
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-7']
Expand All @@ -321,6 +321,9 @@ script:
# by default, use implicit conversions
- if [[ "${IMPLICIT_CONVERSIONS}" == "" ]]; then export IMPLICIT_CONVERSIONS=ON; fi

# append CXX_STANDARD to CMAKE_OPTIONS if required
- CMAKE_OPTIONS+=${CXX_STANDARD:+ -DCMAKE_CXX_STANDARD=$CXX_STANDARD -DCMAKE_CXX_STANDARD_REQUIRED=ON}

# compile and execute unit tests
- mkdir -p build && cd build
- cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DJSON_ImplicitConversions=${IMPLICIT_CONVERSIONS} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release
Expand Down

0 comments on commit aae0e49

Please sign in to comment.