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
f03127eb
Unverified
Commit
f03127eb
authored
3 years ago
by
Niels Lohmann
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set stack size for some unit tests when using MSVC (#2961)
*
set stack size for some unit tests
parent
cb053bce
develop
bon8
gcc_warning_flags
icpc
issue3232_use_catch
master
release/3.10.2
release/3.10.3
release/3.10.4
release/3.10.5
string_view
string_view2
update_doctest
v3.10.5
v3.10.4
v3.10.3
v3.10.2
v3.10.1
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
.github/workflows/windows.yml
.github/workflows/windows.yml
+4
-4
appveyor.yml
appveyor.yml
+2
-9
test/CMakeLists.txt
test/CMakeLists.txt
+7
-0
No files found.
.github/workflows/windows.yml
View file @
f03127eb
...
...
@@ -38,13 +38,13 @@ jobs:
steps
:
-
uses
:
actions/checkout@v2
-
name
:
cmake
run
:
cmake -S . -B build -G "Visual Studio 15 2017" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_
EXE_LINKER_FLAGS="/STACK:4000000" -DCMAKE_
CXX_FLAGS="/W4 /WX"
run
:
cmake -S . -B build -G "Visual Studio 15 2017" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
if
:
matrix.build_type == 'Release' && matrix.architecture == 'x64'
-
name
:
cmake
run
:
cmake -S . -B build -G "Visual Studio 15 2017" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
if
:
matrix.build_type == 'Release' && matrix.architecture != 'x64'
-
name
:
cmake
run
:
cmake -S . -B build -G "Visual Studio 15 2017" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_
EXE_LINKER_FLAGS="/STACK:4000000" -DCMAKE_
CXX_FLAGS="/W4 /WX"
run
:
cmake -S . -B build -G "Visual Studio 15 2017" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
if
:
matrix.build_type == 'Debug'
-
name
:
build
run
:
cmake --build build --config ${{ matrix.build_type }} --parallel
10
...
...
@@ -76,7 +76,7 @@ jobs:
run
:
cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX"
if
:
matrix.build_type == 'Release'
-
name
:
cmake
run
:
cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_
EXE_LINKER_FLAGS="/STACK:4000000" -DCMAKE_
CXX_FLAGS="/W4 /WX"
run
:
cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX"
if
:
matrix.build_type == 'Debug'
-
name
:
build
run
:
cmake --build build --config ${{ matrix.build_type }} --parallel
10
...
...
@@ -89,7 +89,7 @@ jobs:
steps
:
-
uses
:
actions/checkout@v2
-
name
:
cmake
run
:
cmake -S . -B build -G "Visual Studio 16 2019" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
-DCMAKE_EXE_LINKER_FLAGS="/STACK:4000000"
run
:
cmake -S . -B build -G "Visual Studio 16 2019" -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
-
name
:
build
run
:
cmake --build build --config Release --parallel
10
-
name
:
test
...
...
This diff is collapsed.
Click to expand it.
appveyor.yml
View file @
f03127eb
...
...
@@ -6,7 +6,6 @@ environment:
configuration
:
Debug
platform
:
x86
CXX_FLAGS
:
"
/W4
/WX"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
...
...
@@ -14,7 +13,6 @@ environment:
configuration
:
Release
platform
:
x86
CXX_FLAGS
:
"
/W4
/WX"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
...
...
@@ -23,7 +21,6 @@ environment:
platform
:
x86
name
:
with_win_header
CXX_FLAGS
:
"
/W4
/WX"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
...
...
@@ -31,7 +28,6 @@ environment:
configuration
:
Release
platform
:
x86
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/utf-8
/W4
/WX"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 15
2017
...
...
@@ -39,7 +35,6 @@ environment:
configuration
:
Release
platform
:
x86
CXX_FLAGS
:
"
/W4
/WX"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
-DJSON_ImplicitConversions=OFF"
GENERATOR
:
Visual Studio 16
2019
...
...
@@ -47,15 +42,13 @@ environment:
configuration
:
Release
platform
:
x64
CXX_FLAGS
:
"
/W4
/WX"
LINKER_FLAGS
:
"
"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 14
2015
-
APPVEYOR_BUILD_WORKER_IMAGE
:
Visual Studio
2017
configuration
:
Release
platform
:
x64
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/Zc:__cplusplus
/utf-8
/F4000000
/W4
/WX"
LINKER_FLAGS
:
"
/STACK:4000000"
CXX_FLAGS
:
"
/permissive-
/std:c++latest
/Zc:__cplusplus
/utf-8
/W4
/WX"
CMAKE_OPTIONS
:
"
"
GENERATOR
:
Visual Studio 15
2017
...
...
@@ -70,7 +63,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 }
-
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%"
-
cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On "%CMAKE_OPTIONS%"
build_script
:
-
cmake --build . --config "%configuration%"
...
...
This diff is collapsed.
Click to expand it.
test/CMakeLists.txt
View file @
f03127eb
...
...
@@ -100,6 +100,13 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
#target_compile_definitions(test-disabled_exceptions PUBLIC _HAS_EXCEPTIONS=0)
endif
()
# avoid stack overflow, see https://github.com/nlohmann/json/issues/2955
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"MSVC"
)
set_property
(
TARGET test-cbor APPEND_STRING PROPERTY LINK_FLAGS
" /STACK:4000000"
)
set_property
(
TARGET test-msgpack APPEND_STRING PROPERTY LINK_FLAGS
" /STACK:4000000"
)
set_property
(
TARGET test-ubjson APPEND_STRING PROPERTY LINK_FLAGS
" /STACK:4000000"
)
endif
()
#############################################################################
# Test the generated build configs
#############################################################################
...
...
This diff is collapsed.
Click to expand it.
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