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 authored and GitHub committed 2021-08-21 13:55:06 +02:00
1 parent cb053bceb1
commit f03127eb69
3 files changed
+13 -13

No files matched your search

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