Fix CBOT stack overflow test failing on MSVC
Increased the stack size to the default (?) stack size on Linux. The failing test name: CBotUT.FunctionRecursionStackOverflowfix-squashed-planets
parent
167dd01bbe
commit
419bd1cc21
|
@ -187,7 +187,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
message(STATUS "Detected MSVC compiler")
|
message(STATUS "Detected MSVC compiler")
|
||||||
|
|
||||||
set(NORMAL_CXX_FLAGS "/wd\"4244\" /wd\"4309\" /wd\"4800\" /wd\"4996\" /wd\"4351\" /EHsc") # disable some useless warnings
|
# Disable some useless warnings
|
||||||
|
set(NORMAL_CXX_FLAGS "/wd\"4244\" /wd\"4309\" /wd\"4800\" /wd\"4996\" /wd\"4351\"")
|
||||||
if(BUILD_STATIC)
|
if(BUILD_STATIC)
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
else()
|
else()
|
||||||
|
@ -196,6 +197,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
set(TEST_CXX_FLAGS "")
|
set(TEST_CXX_FLAGS "")
|
||||||
add_definitions(-DNOEXCEPT= -DHAS_MSVC_EXCEPTION_BUG)
|
add_definitions(-DNOEXCEPT= -DHAS_MSVC_EXCEPTION_BUG)
|
||||||
|
|
||||||
|
# Increase the stack size to 8 MB (the default is 1 MB), needed for CBOT
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:8388608")
|
||||||
|
|
||||||
# Needed for Debug information (it's set to "No" by default for some reason)
|
# Needed for Debug information (it's set to "No" by default for some reason)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:LIBCMT")
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:LIBCMT")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
|
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
|
||||||
|
|
Loading…
Reference in New Issue