On Tue, Mar 31, 2009 at 12:47:33PM -0400, Lezz Giles wrote:
> ADD_EXECUTABLE( hellow hellow.c )
>
> ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/docs COMMAND cat
> ${CMAKE_SOURCE_DIR}/hellowdoc.template > ${CMAKE_BINARY_DIR}/docs)
>
> ADD_CUSTOM_TARGET(documentation DEPENDS ${CMAKE_BINARY_DIR}/docs)
>
> I want to make my custom_command dependent on the executable. If I add
> "DEPENDS hellow" then it works, but as I said before, this is going to be
> shared across multiple projects. If I add "DEPENDS ALL" or "DEPENDS all"
> then it interprets "all" as a filename and looks for "../all"
I'm still not sure how to best solve your original problem, but the
DEPENDS argument to add_custom_target is for depending on files. You
probably want to use add_dependencies(), which lets you set up
dependencies on targets:
add_dependencies(documentation hellow)
hth,
tyler
_______________________________________________
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