On 2014-03-10 02:55, J Decker wrote:
add_custom_target( xxx )
add_custom_command( TARGET xxx
(PREBUILD? POSTBUILD? PRELINK?)
COMMAND blah )
This doesn't make sense; a custom target doesn't have build/link/etc. steps.
The usual way to do this is:
add_custom_command(OUTPUT x.y ...)
add_custom_target(xxx DEPENDS x.y ...)
...which anyway more correctly expresses the individual file
dependencies, e.g. foo -> foo.in, bar -> bar.in, etc.... so if only
foo.in changes, only the step for foo needs to execute.
EXECUTE( cmake copy_if_different )
Just so you know, this is much better done via configure_file :-). (Of
course that won't be available when you switch to using custom commands,
but...)
--
Matthew
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake