[CMake] ADD_CUSTOM_TARGET(target ALL) and Visual Studio
Sahn Lam
sahn at pobox.com
Thu Jan 24 18:23:53 EST 2008
On Jan 24, 2008 2:17 PM, Hendrik Sattler <post at hendrik-sattler.de> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080124/eb3f9457/attachment-0001.htm
More information about the CMake
mailing list