<div><br><div class="gmail_quote"><div dir="auto">On Thu, 8 Feb 2018 at 4:52 am, Saad Khattak <<a href="mailto:saadrustam@gmail.com">saadrustam@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,<div><br></div><div>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.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>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.</div></div></blockquote><div dir="auto"><br></div><div dir="auto">An alternative to the superbuild approach is the new FetchContent module that has been added in the upcoming 3.11 release. You can see the docs for it here:</div><div dir="auto"><br></div><div dir="auto"><a href="https://cmake.org/cmake/help/git-master/module/FetchContent.html">https://cmake.org/cmake/help/git-master/module/FetchContent.html</a><br></div><div dir="auto"><br></div><div dir="auto">It may be more convenient for the situation you describe. There’s even a somewhat similar example in those docs for inter project dependencies along the lines of your case. </div><div dir="auto"><br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br></div></div>
</blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature">Craig Scott<br>Melbourne, Australia<br><a href="https://crascit.com">https://crascit.com</a></div>