[CMake] Nesting a cmake project
Tyler Roscoe
tyler at cryptio.net
Mon Jun 7 13:48:30 EDT 2010
On Mon, Jun 07, 2010 at 11:54:12AM -0400, Nathan Huesken wrote:
> I have a cmake project into which I want to nest another cmake project.
> The nested cmake project is a complete project working on its own, and
> the outer cmake project depends on it.
> So when the outer cmake project is build, the inner one should be build
> first.
> The inner, as well as the outer cmake project have several targets,
> such as
> - doc
> - test
> ...
I don't have any experience with external projects so I can't help you
there, but two suggestsions/ideas:
1. Why do you need to nest one project inside the other? I think you
will have less trouble if you treat each one as its own independent
project.
2. Use add_subdirectory() instead of add_external_project() to hook
these two projects together.
tyler
More information about the CMake
mailing list