<div class="gmail_quote">On Thu, May 14, 2009 at 4:51 PM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div class="h5">James Bigler wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I need to specify different output files for an add_custom_command for different build types in VS.  The output file also needs to be added to an add_executable command.<br>
<br>
I&#39;m not sure how to go about this.<br>
<br>
Any pointers would be helpful.<br>
</blockquote>
<br></div></div>
How about something like this.<br>
<br>
set(myoutput_file &quot;${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/out.txt&quot;)<br>
add_custom_command(${myoutput_file}<br>
 COMMAND mycommand ${myoutput_file} )<br>
<br>
add_executable (app ${SOURCES} ${myoutput_file})<br>
<br>
<br>
The same works with generators that don&#39;t have configuration types (such as a makefile).<br>
<br>
Clint<br>
</blockquote></div><br>Using CMAKE_CFG_INTDIR worked great!<br><br>Thanks,<br>James<br>