[CMake] ExternalProject and libraries again

Bruce Stephens bruce.r.stephens at gmail.com
Wed Mar 9 16:34:38 EST 2016


On Wed, Mar 9, 2016 at 9:27 PM, Nicholas Braden
<nicholas11braden at gmail.com> wrote:
> I'm not sure which discussion you're referring to, so forgive me if
> this was already mentioned - but are you using a superproject to
> ensure that dependencies are built and installed before your own
> project? That is, all dependencies as well as your own project are
> built via ExternalProject_Add and you use the DEPENDS option to ensure
> build order. This is generally the easiest way to do things, in my
> experience.

Ah! That makes sense. So I have a project (say a single
CMakeLists.txt) which just contains one or more ExternalProject_Add
(maybe other things too, but not much else), and then the subprojects
can sensibly get at previous subprojects. And those can be ordered
using DEPENDS.

OK, I see how that can work. Thanks (and apologies, I'm sure I've read
that advice before but probably I didn't understand it then).


More information about the CMake mailing list