Skip to content

Commit 01daa32

Browse files
committed
🏁 set stack size for some unit tests
1 parent ebf3a80 commit 01daa32

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
101101
endif()
102102

103103
# avoid stack overflow, see https://github.com/nlohmann/json/issues/2955
104-
target_link_libraries(test-cbor PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/STACK:4000000;>")
105-
target_link_libraries(test-msgpack PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/STACK:4000000;>")
106-
target_link_libraries(test-ubjson PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/STACK:4000000;>")
104+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
105+
set_property(TARGET test-cbor APPEND_STRING PROPERTY LINK_FLAGS " /STACK:4000000")
106+
set_property(TARGET test-msgpack APPEND_STRING PROPERTY LINK_FLAGS " /STACK:4000000")
107+
set_property(TARGET test-ubjson APPEND_STRING PROPERTY LINK_FLAGS " /STACK:4000000")
108+
endif()
107109

108110
#############################################################################
109111
# Test the generated build configs

0 commit comments

Comments
 (0)