mirror of
https://github.com/nlohmann/json.git
synced 2026-04-11 18:48:52 +00:00
Set stack size for some unit tests when using MSVC (#2961)
* 🏁 set stack size for some unit tests
This commit is contained in:
@@ -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
|
||||
#############################################################################
|
||||
|
||||
Reference in New Issue
Block a user