[CMake] Build only what you need in third party libs

Troy D. Straszheim troy at resophonic.com
Tue Dec 22 09:37:03 EST 2009


David Cole <david.cole at kitware.com> writes:

> On Tue, Dec 22, 2009 at 7:58 AM, David Wolfe <dwolfe at fifthsally.com> wrote:
>
>     On 12/22/2009 7:11 AM, David Wolfe wrote:
>
>                                                    Most of our external
>         dependencies aren't even built using CMake, so 'CMake-ifying'
>         everything
>         under one big über-build hardly seems worth it...
>
>
>     On 12/22/2009 6:50 AM, David Cole wrote:
>
>         One way to overcome these things, but still build projects from source
>         code as needed is to use a new feature in CMake 2.8: the
>         ExternalProject
>         module...
>
>
>     Wow. That could be *really* useful---especially the fact that it allows
>     you to download sources from the web, CVS, svn, etc.  It might be enough
>     to change my mind about maintaining a separate externals archive. :-)
>
>
>
> If it's not enough to change your mind...... let me know what you think it's
> missing.
>

Here's a use-case: boost-cmake exports buildspace targets to
$CMAKE_BINARY_DIR/lib/Exports.cmake.  So you'd want to download,
extract, run cmake on the unpacked archive, and only then include() the
exported targets...  Does ExternalProject work this way?

-t


More information about the CMake mailing list