<div class="gmail_quote">On Tue, Dec 22, 2009 at 9:37 AM, Troy D. Straszheim <span dir="ltr"><<a href="mailto:troy@resophonic.com">troy@resophonic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">David Cole <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>> writes:<br>
<br>
> On Tue, Dec 22, 2009 at 7:58 AM, David Wolfe <<a href="mailto:dwolfe@fifthsally.com">dwolfe@fifthsally.com</a>> wrote:<br>
><br>
> On 12/22/2009 7:11 AM, David Wolfe wrote:<br>
><br>
> Most of our external<br>
> dependencies aren't even built using CMake, so 'CMake-ifying'<br>
> everything<br>
> under one big über-build hardly seems worth it...<br>
><br>
><br>
> On 12/22/2009 6:50 AM, David Cole wrote:<br>
><br>
> One way to overcome these things, but still build projects from source<br>
> code as needed is to use a new feature in CMake 2.8: the<br>
> ExternalProject<br>
> module...<br>
><br>
><br>
> Wow. That could be *really* useful---especially the fact that it allows<br>
> you to download sources from the web, CVS, svn, etc. It might be enough<br>
> to change my mind about maintaining a separate externals archive. :-)<br>
><br>
><br>
><br>
> If it's not enough to change your mind...... let me know what you think it's<br>
> missing.<br>
><br>
<br>
</div></div>Here's a use-case: boost-cmake exports buildspace targets to<br>
$CMAKE_BINARY_DIR/lib/Exports.cmake. So you'd want to download,<br>
extract, run cmake on the unpacked archive, and only then include() the<br>
exported targets... Does ExternalProject work this way?<br></blockquote><div><br></div><div>It does work that way if you set it up that way.</div><div><br></div><div>So you would have one ExternalProject_Add call to build and install boost-cmake... and then a subsequent ExternalProject_Add call to build something that depends on it. In this dependent project you would use "DEPENDS boost-cmake-proj" to express this dependency. And pass whatever -D or prefix information you need to the configure step of this dependent project so that it knows where the boost-cmake build is.</div>
<div><br></div><div>An external project must configure, build and install all the way before any of the projects that depend on it even run their first build step.</div><div><br></div><div>It's pretty flexible and customizable. If there's a build step that does not do what you want it to by default, you can replace it with your own custom step. And you can inject custom steps into the stream of steps that occur by default, too.</div>
<div><br></div><div>HTH,</div><div>David</div><div><br></div></div>