On 6/13/2010 1:55 PM, Mathias Bauer wrote:
On 06/10/2010 08:19 PM, Bill Hoffman wrote:
add_depend is used to express depends that the build system can not
figure out. For most cases, it is not needed. add_library(a ...)
target_link_library(a b), a now depends on library b. It is when you use
custom commands, or have generated source files that are not known at
configure time that you would need to use add_depend.
Exactly. And we have a lot of these "custom" targets. A build system
tailored to that can make "add_depend" or similar unnecessary as it
*can* figure that out, in the same way as CMake can figure it out for C
libraries, because it knows how to build them. Our plan is that all
target types and the ways they are built are known to the build system
and declaring one of these targets automatically takes care of the
dependencies.
A simple CMake macro should be able to do that for you. I guess I don't
know enough about what your custom targets are for and how they would
relate to each other to be able to give an example.
In the library example above, you still need that target_link_library
call to create the depend. However, if you leave it out, things don't
link.
-Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]