[CMake] Why does cmake adds /STACK:10000000 for msvc linker?

Andreas Pokorny andreas.pokorny at gmail.com
Wed Apr 15 03:39:39 EDT 2009


Hello,

2009/4/12 Christian Ehrlicher <Ch.Ehrlicher at gmx.de>:
> Hi,
>
> I don't understand the reason behind this. We've a very huge memory
> footprint because of this on kde4/windows - kded4.exe has ~30 Threads
> which means 300MB of stack!
>
> Is there an easy way to change this?

In http://cmake.org/Bug/view.php?id=7919 I added a cmake variable to
modify that setting from toolchain files. Since the default heap on
CE5 has only 32MB. This is done by setting CMAKE_STACK_SIZE inside the
toolchain file to a numeric value.

But before that we simply added /STACK:65536,4096 to all
CMAKE_{EXE,SHARED}_LINKER_FLAGS. 64kb should be enough for most people
:).

kind regards
Andreas Pokorny


More information about the CMake mailing list