On 03/06/2012 02:01 PM, Michael Hertling wrote:
Yes, the DEPENDS clause of ADD_CUSTOM_TARGET() is only for *file*
dependencies, but you use it for *target* dependencies. According
to the documentation of ADD_CUSTOM_TARGET():
"Dependencies listed with the DEPENDS argument may reference files
and outputs of custom commands created with add_custom_command()
in the same directory (CMakeLists.txt file)."
"Use ADD_DEPENDENCIES to add dependencies to or from other targets."
Regards,
Michael
--
I opened a thread some time ago about this, and I actually thought it
was a bug in the documentation, because then why everything works otherwise?
This simple example which I produced
add_custom_target(a
${CMAKE_COMMAND} -E echo "a"
)
add_custom_target(b
${CMAKE_COMMAND} -E echo "b"
DEPENDS a
)
does exactly what would be expected, even if there files a or b don't exist.
So I might suppose that this intra-target dependencies work but not always,
is that correct?
--
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