summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-MSVC.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-11-23 16:41:58 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-11-23 16:41:58 (GMT)
commit51af1da3d21b95540888d585fccdaa8d68d1fdd8 (patch)
treefe93876ae7b7027c8e3b531b7a56df3ba6cc3e35 /Modules/Platform/Windows-MSVC.cmake
parent0499f93716602ba906e292f279e215f4a8e92a01 (diff)
downloadCMake-51af1da3d21b95540888d585fccdaa8d68d1fdd8.zip
CMake-51af1da3d21b95540888d585fccdaa8d68d1fdd8.tar.gz
CMake-51af1da3d21b95540888d585fccdaa8d68d1fdd8.tar.bz2
CMake: Remove "/STACK:10000000" from default linker flags (#12437)
Modern apps that use multiple threads do NOT want 10 Megabytes of RAM per thread being used for each thread's stack... Just leave off the /STACK: argument, and let the compiler use a reasonable default value for the stack size. If existing single-threaded apps require the /STACK: argument because they do need a very large stack size, they can add the flag in their own CMakeLists files.
Diffstat (limited to 'Modules/Platform/Windows-MSVC.cmake')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 32dd546..5cbf9ee 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -165,7 +165,7 @@ set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
# executable linker flags
set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
-# set the stack size and the machine type
+# set the machine type
set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
if(NOT _MACHINE_ARCH_FLAG)
set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
@@ -178,7 +178,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE")
endif()
endif()
set (CMAKE_EXE_LINKER_FLAGS_INIT
- "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
+ "${CMAKE_EXE_LINKER_FLAGS_INIT} /machine:${_MACHINE_ARCH_FLAG}")
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
# on versions that support it