On Jan 24, 2008 2:17 PM, Hendrik Sattler <[EMAIL PROTECTED]> wrote:

> Am Donnerstag 24 Januar 2008 schrieb Sahn Lam:
> > I don't trust myself to be able to specify the dependencies correctly -
> now
> > or in the future.  It is not as simple as it seems.  For example, let's
> say
> > I have this structure:
> >
> > libA has gen.h which is generated
> > libB has header1.h which includes libA/gen.h
> > libC has header2.h which includes libB/header1.h
> >
> > If I understand how cmake works correctly, in order for things to get
> built
> > in the right order, I have to use ADD_DEPENDENCIES to tell cmake that to
> > build libA before libB and libC.
>
> You shouldn't have to do anything to make that work, actually. That's what
> the
> dependency scanner is supposed to handle automatically.
> Do you add the header files as source files to the add_library()?
>
> HS
>


I did use ADD_LIBRARY to add gen.h to libA along with all the other source
files in libA.  That didn't generate the correct build order unless I
explicitly made libB and libC depend on libA using ADD_DEPENDENCIES.

What am I missing?

Thanks,

Sahn
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to