From da7e501e3ae592bd76e91bc60c58ce7bcf0ef696 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 24 Aug 2023 13:47:37 +1000 Subject: [PATCH] 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. --- tests/ctest/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ctest/CMakeLists.txt b/tests/ctest/CMakeLists.txt index f77b7eb489..1860cd1b34 100644 --- a/tests/ctest/CMakeLists.txt +++ b/tests/ctest/CMakeLists.txt @@ -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)