Set stack size for some unit tests when using MSVC (#2961)

* 🏁 set stack size for some unit tests
This commit is contained in:
Niels Lohmann
2021-08-21 13:55:06 +02:00
committed by GitHub
parent cb053bceb1
commit f03127eb69
3 changed files with 13 additions and 13 deletions

View File

@@ -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
#############################################################################