Apparently this won't work... /STACK doesn't show up in any of the compile flags retrieved this way. However, CMAKE_EXE_COMPILER_FLAGS doesn't apply to library targets, right? <br><br><div class="gmail_quote">On Wed, Jun 27, 2012 at 2:19 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This flag is appended to DLL targets too, so I created this (i haven't tested it yet though):<div><div><br></div><div>
function( _remove_stack_flag target_name )</div><div><span style="white-space:pre-wrap">        </span>get_property( flags TARGET ${target_name} PROPERTY COMPILE_FLAGS )</div>
<div><span style="white-space:pre-wrap">        </span>string( REGEX REPLACE "/STACK:[0-9]+" "" flags ${flags} )</div><div><span style="white-space:pre-wrap">        </span>set_property( TARGET ${target_name} PROPERTY COMPILE_FLAGS ${flags} )</div>
<div>endfunction()</div></div><div><br></div><div>I call this once for each target I define.</div><div class="HOEnZb"><div class="h5"><div><br><br><div class="gmail_quote">On Wed, Jun 27, 2012 at 2:17 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You could do:<br>
<br>
string(REPLACE "/STACK:10000000 " "" CMAKE_EXE_LINKER_FLAGS<br>
"${CMAKE_EXE_LINKER_FLAGS}")<br>
<br>
after the first project command in the top level CMakeLists file. (Or<br>
"/STACK:some other number" to change it, instead of the empty string<br>
to just remove it...)<br>
<br>
The /STACK string only appears in the two files:<br>
<br>
Modules/Platform/Windows-Intel.cmake<br>
Modules/Platform/Windows-cl.cmake<br>
<br>
<br>
HTH,<br>
David<br>
<div><div><br>
<br>
On Wed, Jun 27, 2012 at 3:11 PM, Robert Dailey <<a href="mailto:rcdailey.lists@gmail.com" target="_blank">rcdailey.lists@gmail.com</a>> wrote:<br>
> This is added to every generated visual studio project from version 7.1 to<br>
> 9. How can I tell CMake not to modify the stack size?<br>
</div></div><span><font color="#888888">> --<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br>