mirror of
https://github.com/nlohmann/json.git
synced 2024-07-22 22:21:54 +02:00
Fix travis configuration to enable C++17 tests
This commit is contained in:
parent
8247a217bb
commit
aae0e4959e
|
@ -210,7 +210,7 @@ matrix:
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
- COMPILER=g++-9
|
- COMPILER=g++-9
|
||||||
- CXXFLAGS=-std=c++2a
|
- CXX_STANDARD=17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
|
@ -294,7 +294,7 @@ matrix:
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env:
|
env:
|
||||||
- COMPILER=clang++-7
|
- COMPILER=clang++-7
|
||||||
- CXXFLAGS=-std=c++1z
|
- CXX_STANDARD=17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-7']
|
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-7']
|
||||||
|
@ -321,6 +321,9 @@ script:
|
||||||
# by default, use implicit conversions
|
# by default, use implicit conversions
|
||||||
- if [[ "${IMPLICIT_CONVERSIONS}" == "" ]]; then export IMPLICIT_CONVERSIONS=ON; fi
|
- 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
|
# compile and execute unit tests
|
||||||
- mkdir -p build && cd build
|
- mkdir -p build && cd build
|
||||||
- cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DJSON_ImplicitConversions=${IMPLICIT_CONVERSIONS} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release
|
- cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DJSON_ImplicitConversions=${IMPLICIT_CONVERSIONS} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release
|
||||||
|
|
Loading…
Reference in a new issue