On Mon, Mar 31, 2008 at 11:24 PM, Surya Kiran Gullapalli <<a href="mailto:suryakiran.gullapalli@gmail.com">suryakiran.gullapalli@gmail.com</a>> 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 call accordingly to supply extra option WIN32 based on the build type.?</blockquote></div>
<div><br>Same limiting issue here. 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. This would be a neat feature request to add but could prove difficult to implement.</div>
</div></blockquote>
<div> </div>
</div><div>Use</div>
<div> </div>
<div>SET_TARGET_PROPERTIES ( ${TARGET} PROPERTIES</div>
<div>LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS"</div>
<div>LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE"</div>
<div>LINK_FLAGS "/ENTRY:mainCRTStartup"</div>
<div>)</div>
<div> </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