[CMake] how work dependencies
Bill Hoffman
bill.hoffman at kitware.com
Sun Feb 18 18:58:01 EST 2007
klaas.holwerda wrote:
> Hi,
>
> I always thought that Cmake did automatically rebuild libraries,
> within the same Cmake build, linked to my application.
> Like if i have several libraries created with ADD_LIBRARY() and linked
> to my end executable with TARGET_LINK_LIBARIES or just LINK_LIBRARIES.
> But it seems i am missing something, since it stopped working for me,
> and i don't know which change did that.
> Maybe it is SET_TARGET_PROPERTIES() which i use to set output names
> for libraries, different from the ones in ADD_LIBRARY its target.
> So the end executable target, is linked with the endname from the
> properties, not with the original target name of ADD_LIBRARY.
>
> SO the question is, do i need to use:
>
> ADD_DEPENDCIES explicit, to make target like the above depend on the
> other lower targets?
>
> Or should this be automatic ( which it was for me before ), and is
> something else wrong?
It should be working. The best thing to try is make VERBOSE=1 and look
at the output.
Can you create a small test case?
-Bill
More information about the CMake
mailing list