[CMake] Update and build child projects if a parent (dependency) is updated

Saad Khattak saadrustam at gmail.com
Wed Feb 7 12:51:48 EST 2018


Hi,

I have a lot of projects with many dependencies. Support ProjE depends on
ProjD which in turn depends on ProjB and ProjC where ProjB depends on ProjA.

If ProjA, is updated, I would like some way to trigger the generate/build
(or just build, assuming the projects are already generated) ProjB, ProjD
and ProjE (not ProjC as it did not depend on ProjA).

I realize this is not possible without ProjA somehow knowing about its
dependent projects. And so I don't mind if it's a new master project or
super build. What I would like however is for CMake to generate this master
project for me (as it already knows the dependency hierarchy). Then, it'll
just be a matter of building this 'superbuild' which in turn detects that
ProjA has been updated, and updates/builds all its dependents.

I can do this manually by ExternalProject_Add, but that is just error prone
and not at all automated. If the projects go into the double or triple
digit range, you can see why manually preparing the superbuild project is
not a good solution.

Thanks,
Saad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180207/fb6426fe/attachment.html>


More information about the CMake mailing list