<div class="gmail_quote">On Thu, Apr 15, 2010 at 12:01 PM, Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch">biddisco@cscs.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
So what exactly is the point of externalproject_add if you can't add an external project to the build?<br>
<div class="im"><br></div></blockquote></div><br>The point of it is to enable easy creation of consistent builds of many dependencies, so that you don't have to wire things up by hand. Which is actually fairly compelling once you go beyond one simple dependency.<br>
<br>It's also very easy to customize and allows you to blend in builds of non-CMake-built stuff as needed in a CMake-based build system.<br><br>But it is not (and never will be) a simple, drop-in replacement for add_subdirectory. The reason is simple: it defers *all* steps possible, including even downloading of source code from a URL, to *build* time. And so information needed at configure time is not available.<br>
<br>See my article in The Source from October 2009, starting on p. 14, for more details. <a href="http://kitware.com/products/archive/kitware_quarterly1009.pdf">http://kitware.com/products/archive/kitware_quarterly1009.pdf</a><br>
<br><br>HTH,<br>David C.<br><br>