[CMake] integrating cmake projects and those built with legacy build systems

David Cole david.cole at kitware.com
Thu Feb 5 13:08:23 EST 2009


It is only in CVS HEAD of CMake at this point, but you may consider using
the new function add_external_project (in Modules/AddExternalProject.cmake)
for this purpose. There is example usage in the CMake source tree at
CMake/Tests/ExternalProject/CMakeLists.txt.

It will eventually be released in a CMake 2.8 release, but there is no firm
time table on that release at this point.

The test case builds several sub-projects as "external projects" each with
their own individual source tree and build tree. All the projects built in
the test cases use CMake to configure, but the various *_COMMAND arguments
to add_external_project function allow you to customize each step, to allow,
for example, configuring projects that have a "./configure" script in their
source tree... provided you are building on a system that can run the
./configure script.

Eventually, I will get around to writing some better documentation (maybe on
the Wiki?) and real-world examples related to add_external_project, but for
now, the functionality is in CVS HEAD of CMake. Take a look at it, see if
you can figure it out, and feel free to ask questions on the mailing list.
I'm monitoring it most days...


HTH,
David


On Wed, Feb 4, 2009 at 1:28 PM, Bill O'Hara <billtohara at gmail.com> wrote:

> As I ponder moving our entire hairy system to cmake, I'm stuck with several
> sub-projects where I will not want to replace the existing build system. In
> particular we use internal builds of several FSF tools and when necessary to
> build one as part of building a cmake'd project we'll just want to delegate
> that work to the existing autotools setup to get things built and then
> continue in cmake.
>
> I'm assuming this has been hit before by people. Are there any useful
> semi-standard modules for handling delegating to autotools build for some
> projects, passing in various options and rebuilding as required if something
> changes? (Eg. if something changes in a cmake'd project that requires
> rebuilding our tweaked gnu tool that depends on our change in some way). Any
> advice from those that have gone down this path before?
>
> thanks
> b.
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090205/e2e0fc26/attachment.htm>


More information about the CMake mailing list