add travis task : compile and test under C++17
This commit is contained in:
parent
eb7376bb13
commit
c88fb1cc9f
17
.travis.yml
17
.travis.yml
@ -218,6 +218,17 @@ matrix:
|
|||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: ['g++-9', 'ninja-build']
|
packages: ['g++-9', 'ninja-build']
|
||||||
|
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc
|
||||||
|
env:
|
||||||
|
- COMPILER=g++-9
|
||||||
|
- CXXFLAGS=-std=c++17
|
||||||
|
- CMAKE_CXX_STANDARD=17
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
|
packages: ['g++-9', 'ninja-build']
|
||||||
|
|
||||||
# Linux / Clang
|
# Linux / Clang
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
@ -323,7 +334,11 @@ script:
|
|||||||
|
|
||||||
# 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_BuildTests=On -GNinja && cmake --build . --config Release
|
- if [[ "${CMAKE_CXX_STANDARD}" != "" ]]; then
|
||||||
|
cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release ;
|
||||||
|
else
|
||||||
|
cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -DJSON_BuildTests=On -GNinja && cmake --build . --config Release ;
|
||||||
|
fi
|
||||||
- ctest -C Release --timeout 2700 -V -j
|
- ctest -C Release --timeout 2700 -V -j
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user