On Mon, Mar 31, 2008 at 11:24 PM, Surya Kiran Gullapalli &lt;<a href="mailto:suryakiran.gullapalli@gmail.com">suryakiran.gullapalli@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="Ih2E3d">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div class="gmail_quote">
<div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I want to do similar change for ADD_EXECUTABLE as well.<br><br>For Debug builds I want to have a console popping up to show the debug messages, and for release builds I do not want the console.<br>

<br>How can i change the ADD_EXECUTABLE&nbsp; call accordingly to supply extra option WIN32 based on the build type.?</blockquote></div>
<div><br>Same limiting issue here.&nbsp; You can build the executable twice for all configurations (one with WIN32, one without) or you can resort to a single build configuration per Visual Studio solution file.<br><br>For you to get the kind of behavior you want, CMake would have to be modified to run multiple times for each build type in CMAKE_CONFIGURATION_TYPES and then modify the project files accordingly for each configuration type, depending on the CMake commands the user issued.&nbsp; This would be a neat feature request to add but could prove difficult to implement.</div>

</div></blockquote>
<div>&nbsp;</div>
</div><div>Use</div>
<div>&nbsp;</div>
<div>SET_TARGET_PROPERTIES ( ${TARGET} PROPERTIES</div>
<div>LINK_FLAGS_DEBUG &quot;/SUBSYSTEM:WINDOWS&quot;</div>
<div>LINK_FLAGS_RELEASE &quot;/SUBSYSTEM:CONSOLE&quot;</div>
<div>LINK_FLAGS &quot;/ENTRY:mainCRTStartup&quot;</div>
<div>)</div>
<div>&nbsp;</div>
<div>In that case, debug executable will be built with a console and release one with out console.</div></div></blockquote><div><br>Great idea!<br><br></div></div>-- <br>Philip Lowman