Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
79732931
Unverified
Commit
79732931
authored
Jul 16, 2020
by
Théo DELRIEU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a CI job for explicit conversions on every os
parent
74b446f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
.travis.yml
.travis.yml
+18
-1
appveyor.yml
appveyor.yml
+22
-1
No files found.
.travis.yml
View file @
79732931
...
...
@@ -145,6 +145,11 @@ matrix:
-
os
:
osx
osx_image
:
xcode12
-
os
:
osx
osx_image
:
xcode12
env
:
-
IMPLICIT_CONVERSIONS=OFF
# Linux / GCC
-
os
:
linux
...
...
@@ -203,6 +208,16 @@ matrix:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
'
g++-9'
,
'
ninja-build'
]
-
os
:
linux
compiler
:
gcc
env
:
-
COMPILER=g++-9
-
IMPLICIT_CONVERSIONS=OFF
addons
:
apt
:
sources
:
[
'
ubuntu-toolchain-r-test'
]
packages
:
[
'
g++-9'
,
'
ninja-build'
]
-
os
:
linux
compiler
:
gcc
env
:
...
...
@@ -315,10 +330,12 @@ script:
-
if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
# by default, use the single-header version
-
if [[ "${MULTIPLE_HEADERS}" == "" ]]; then export MULTIPLE_HEADERS=OFF; fi
# by default, use implicit conversions
-
if [[ "${IMPLICIT_CONVERSIONS}" == "" ]]; then export IMPLICIT_CONVERSIONS=ON; fi
# compile and execute unit tests
-
mkdir -p build && cd build
-
cmake .. ${CMAKE_OPTIONS} -DJSON_MultipleHeaders=${MULTIPLE_HEADERS} -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
-
ctest -C Release --timeout 2700 -V -j
-
cd ..
...
...
appveyor.yml
View file @
79732931
...
...
@@ -7,6 +7,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
...
...
@@ -14,6 +15,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 15
2017
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2019
...
...
@@ -21,6 +23,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 16
2019
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2019
...
...
@@ -28,6 +31,7 @@ environment:
platform
:
x64
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 16
2019
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
...
...
@@ -36,6 +40,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Ninja
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
...
...
@@ -44,6 +49,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Ninja
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
...
...
@@ -51,6 +57,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
...
...
@@ -59,6 +66,7 @@ environment:
name
:
with_win_header
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
...
...
@@ -66,6 +74,7 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/utf-8"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 15
2017
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2019
...
...
@@ -73,6 +82,15 @@ environment:
platform
:
x86
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
-DJSON_ImplicitConversions=OFF"
GENERATOR
:
Visual Studio 16
2019
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2019
configuration
:
Release
platform
:
x64
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 16
2019
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2015
...
...
@@ -80,6 +98,7 @@ environment:
platform
:
x64
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
...
...
@@ -87,6 +106,7 @@ environment:
platform
:
x64
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/Zc:__cplusplus
/utf-8
/F4000000"
LINKER_FLAGS
:
"
/STACK:4000000"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 15
2017
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2019
...
...
@@ -94,6 +114,7 @@ environment:
platform
:
x64
CXX_FLAGS
:
"
"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 16
2019
init
:
...
...
@@ -112,7 +133,7 @@ before_build:
# for with_win_header build, inject the inclusion of Windows.h to the single-header library
-
ps
:
if ($env:name -Eq "with_win_header") { $header_path = "single_include\nlohmann\json.hpp" }
-
ps
:
if ($env:name -Eq "with_win_header") { "#include <Windows.h>`n" + (Get-Content $header_path | Out-String) | Set-Content $header_path }
-
if "%GENERATOR%"=="Ninja" (cmake . -G "%GENERATOR%" -DCMAKE_BUILD_TYPE="%configuration%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On
) else (cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On
)
-
if "%GENERATOR%"=="Ninja" (cmake . -G "%GENERATOR%" -DCMAKE_BUILD_TYPE="%configuration%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On
"%CMAKE_OPTIONS%") else (cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%"
)
build_script
:
-
cmake --build . --config "%configuration%"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment