James Bigler wrote:
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.
I'm not sure how to go about this.
Any pointers would be helpful.
How about something like this.
set(myoutput_file "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/out.txt")
add_custom_command(${myoutput_file}
COMMAND mycommand ${myoutput_file} )
add_executable (app ${SOURCES} ${myoutput_file})
The same works with generators that don't have configuration types (such
as a makefile).
Clint
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake