That's right. You can pass various initial cache entries, such as BOOST_ROOT, via the CMAKE_CACHE_ARGS parameter to ExternalProject_Add.
A useful example of this is the Titan project: http://www.kitware.com/InfovisWiki/index.php/Main_Page You can see how it builds VTK as an external project, forcing it to use the externally-built Boost via cache arguments. On Mon, Jun 18, 2012 at 11:03 AM, Knox, Kent <[email protected]> wrote: > That is an interesting approach; if this 'superbuild' cmake project > downloaded and built all the external dependencies first, then my project > could find those dependencies with the appropriate find module? I suppose > that the 'superbuild' could set the BOOST_ROOT variable (or other appropriate > variables) for my real project. I'll play around with this idea when I get > some time, thanks for the comment! > > -----Original Message----- > From: Ben Medina [mailto:[email protected]] > Sent: Monday, June 18, 2012 11:59 AM > To: Knox, Kent > Cc: [email protected] > Subject: Re: [CMake] ExternalProject_Add and Boost > >> 4. ExternalProject_Add will download, configure and build projects at >> 'build' time. From the documentation, this sounded like a design decision. >> However, this means that you can't use the already robust and mature >> findboost() module to configure the Boost project. Would it be >> possible to add support to ExternalProject_Add to work at 'configure' time? > > The approach that seems most common is to create a "superbuilder" > project that builds your dependencies as external projects, then builds your > own project (also as an external project) at the end. > > > -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
