<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="gmail_quote">
<div class="Ih2E3d">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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>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>&nbsp;</div>
<div>Surya</div>
<div>&nbsp;</div></div>