Tests: Force 1MB stack size for MSVC

For some reason, the stack refuses to grow with the latest MSVC updates,
at least within our unit tests that bump the stack considerably within
a lambda function.

Just force the commit size to 1MB for now.
This commit is contained in:
Stenzek 2023-08-24 13:47:37 +10:00 committed by refractionpcsx2
parent 42ae23f279
commit da7e501e3a
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,12 @@ macro(add_pcsx2_test target)
add_dependencies(unittests ${target})
add_test(NAME ${target} COMMAND ${target})
if(MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# For some reason, the stack refuses to grow with the latest MSVC updates.
# Just force the commit size to 1MB for now.
set_target_properties(${target} PROPERTIES LINK_FLAGS "/STACK:1048576,1048576")
endif()
endmacro()
add_subdirectory(gtest)