[CMake] CMake 2.8.12.2: Visual Studio 10 generator - Bad handling of /STACK:reserve[, commit] compilation flag

Dominique Ledit Dominique.Ledit at PDGM.com
Fri Jul 18 08:35:19 EDT 2014


Hi everybody

I'm currently working with the 2.8.12.2 CMake version, and have an issue with the Visual Studio 10 Win64 Generator.

In The CMakeLists.txt file I use to generate an executable, I've added

SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:134217728,32768")

CMake generator correctly builds the VS solution containing the target to build the executable.

Looking in the VS 10 IDE at the "Properties>Configuration Properties>Linker>System" of the target corresponding to the executable I saw for  the two corresponding properties:
Stack Reserve Size       134217728,32768
Stack Commit Size

The Stack Reserve Size value contains both stack reserve size and stack commit size with the comma separator
The Stack Commit Size properties is not defined.

It looks as if the /STACK:134217728,32768 Linker flag is incorrectly parsed by the CMake Visual Studio 10 Generator.

Looking at the source code of this generator (downloaded from the CMake web site), it seems that the commit size is deliberately skipped (same thing for the /HEAP:reserve[,commit] compiler flag)

Does anybody know why?
Is there a way to pass a stack commit size?

Thank you in advance

Dominique
-------------------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140718/9867522c/attachment.html>


More information about the CMake mailing list