<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>ExternalProject_Add(A<br>...<br>)<br><br></div>ExternalProject_Add(B<br></div>DEPENDS A<br>...)<br><br></div>ExternalProject_Add(C<br></div>DEPENDS B<br>
...<br>)<br><br></div>CMake will take care of the build order of those projects<br><br></div>Please check winstng for a complex project with a lot of interdependencies. The documentation for ExternalProject and this article by David Cole also help a lot:<br>
<br><a href="http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html">http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html</a><br><br><br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">
On Sun, Oct 27, 2013 at 10:31 PM, Witold E Wolski <span dir="ltr"><<a href="mailto:wewolski@gmail.com" target="_blank">wewolski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Kent,<br>
<br>
Thank you for pointing me to this project.<br>
I did some searching for an explanation of the superbuild cmake<br>
pattern but didn't find any text resources.<br>
<br>
I am wondering if the superbuild pattern can cover the following case:<br>
<br>
I.e. given 3 projects A, B and C where B depends on A and C depends on<br>
B ... that means B will not build without A... and C not without B.<br>
Is this covered by the superbuild pattern for C? Or asked differently<br>
how can the superbuild of C control the build of B so that B finds the<br>
product of A?<br>
<br>
I guess this is controlled by the order how the external projects are<br>
added. Right? In which file is this done in the NamiceExternalProject?<br>
<br>
Furthermore, What happens if B is an Superbuild patter project already?<br>
<br>
<br>
<br>
regards<br>
Witold<br>
<br>
<br>
<br>
On 25 October 2013 17:18, Williams, Norman K<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:norman-k-williams@uiowa.edu">norman-k-williams@uiowa.edu</a>> wrote:<br>
> There is our project here:<br>
> <a href="https://github.com/BRAINSia/NAMICExternalProjects" target="_blank">https://github.com/BRAINSia/NAMICExternalProjects</a><br>
><br>
> This is set up using the CMake 'SuperBuild' pattern first used with Slicer.<br>
><br>
> It might be more complicated a setup than you have in mind, but it builds<br>
> a large number of interdependent packages.<br>
><br>
> It's structured as a two-phase setup: First, all prerequisite packages<br>
> are built, and then the actual project is built. As NamicExternalProjects<br>
> is set up as a functioning prototype, the 'top-level' CMake project is<br>
> empty.<br>
><br>
> Adding a new external project is a matter of copying<br>
> SuperBuild/External_Template.cmake to<br>
> SuperBuild/External_<your_project>.cmake and editing it to make it<br>
> specific to that project. This mostly amounts to setting its<br>
> dependencies, where to download the source from, and which version to<br>
> download.<br>
><br>
> --<br>
> Kent Williams <a href="mailto:norman-k-williams@uiowa.edu">norman-k-williams@uiowa.edu</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On 10/24/13 3:35 AM, "Witold E Wolski" <<a href="mailto:wewolski@gmail.com">wewolski@gmail.com</a>> wrote:<br>
><br>
>>Would also like to start configuring external dependencies with<br>
>><br>
>>ExternalProject_Add<br>
>><br>
>>So some examples would be pretty useful to me. So did you ended up<br>
>>collecting some examples?<br>
>>Sure, you posted in this links to repositories, but finding the<br>
>>"ExternalProject_Add" in these huge projects with hundreds of<br>
>>CMakeLists.txt is not easy if they are not in the top-level<br>
>>CMakeLists.txt and they are not there.<br>
>><br>
>>My dependencies are<br>
>><br>
>>gtest - Cmake<br>
>>glog - Cmake<br>
>>tbb - configure make<br>
>>vigra - Cmkae based<br>
>>soci - Cmake based<br>
>>pwiz<br>
>><br>
>><br>
>>regards<br>
>><br>
>><br>
>><br>
>>On 18 March 2012 00:24, Luigi Calori <<a href="mailto:l.calori@cineca.it">l.calori@cineca.it</a>> wrote:<br>
>>> On 17/03/2012 22.11, Marcus D. Hanwell wrote:<br>
>>>><br>
>>>> On Sat, Mar 17, 2012 at 5:03 PM, Bill Lorensen<<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Folks,<br>
>>>>><br>
>>>>> I've recently created a number of super builds using CMake's External<br>
>>>>> Project mechanism. Each external project requires some sort of<br>
>>>>> download, configuration, build and possibly install. The CMake defines<br>
>>>>> needed to correctly access the results of the external project vary<br>
>>>>> significantly. The trickiest part is find the proper download,<br>
>>>>> configuration and CMake defines.<br>
>>>>><br>
>>>>> For example, for the Point Cloud Library (<a href="http://pointclouds.org/" target="_blank">http://pointclouds.org/</a>) I<br>
>>>>> created these external projects:<br>
>>>>> VTK - git, cmake, make; VTK_DIR<br>
>>>>> FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR<br>
>>>>> Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR<br>
>>>>> Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR<br>
>>>>> Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT<br>
>>>>> GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR<br>
>>>>><br>
>>>>> Slicer4 has many more.<br>
>>>>><br>
>>>>> Should we start collecting sample ExternalProject_Add files for<br>
>>>>> external projects?<br>
>>>><br>
>>>> We have talked about doing this too (I have Eigen, Boost, GTest and<br>
>>>> others for example). The standard CMake based projects hardly seem<br>
>>>> worth it, but it depends on what you want to do with them I suppose.<br>
>>>> For the work we are doing in chemistry we have been working on an<br>
>>>> experimental superbuild that uses a common prefix in the build tree to<br>
>>>> install to, and then all we need pass in is CMAKE_PREFIX_PATH - this<br>
>>>> can make the logic significantly easier for dependent CMake projects<br>
>>>> as it will always search within the prefix first.<br>
>>><br>
>>> I did something similar, trying to collet all the build of stuff that I<br>
>>>had<br>
>>> to do in a single place powered by cmake<br>
>>> Used CMAKE_PREFIX_PATH and a single source place where all the builds<br>
>>> download and expand<br>
>>><br>
>>> you can have a look at<br>
>>><br>
>>> <a href="https://hpc-forge.cineca.it/svn/CmakeBuilds/lib/" target="_blank">https://hpc-forge.cineca.it/svn/CmakeBuilds/lib/</a><br>
>>><br>
>>> It's just for my use only, so really dirty and not properly checked, I'<br>
>>>m<br>
>>> also looking for good starting point for common stuff like Qt, boost and<br>
>>> others<br>
>>> (I' tried to collect in the folder Packages the tricky part of building<br>
>>> the components,) I' ve tried to define a dependency graph but it' still<br>
>>> messy<br>
>>><br>
>>> anyway I would really appreciate a place where to share good "recipies"<br>
>>>for<br>
>>> CMake building packeges<br>
>>><br>
>>> Thanks<br>
>>> Luigi<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>>><br>
>>>> The Qt external project was pretty tricky too, and we are using that<br>
>>>> in several places along with smaller libraries like libxml2.<br>
>>>><br>
>>>> Marcus<br>
>>>> --<br>
>>>><br>
>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>><br>
>>>> Visit other Kitware open-source projects at<br>
>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>><br>
>>>> Please keep messages on-topic and check the CMake FAQ at:<br>
>>>> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Luigi Calori<br>
>>> SuperComputing Applications and Innovation Department<br>
>>> CINECA - via Magnanelli, 6/3, 40033 Casalecchio di Reno (Bologna) -<br>
>>>ITALY<br>
>>> Tel: <a href="tel:%2B39%20051%206171509" value="+390516171509">+39 051 6171509</a> Fax: <a href="tel:%2B39%20051%206132198" value="+390516132198">+39 051 6132198</a><br>
>>> <a href="http://hpc.cineca.it" target="_blank">hpc.cineca.it</a><br>
>>><br>
>>><br>
>>> --<br>
>>><br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Please keep messages on-topic and check the CMake FAQ at:<br>
>>> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
>><br>
>><br>
>><br>
>>--<br>
>>Witold Eryk Wolski<br>
>>--<br>
>><br>
>>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>>Please keep messages on-topic and check the CMake FAQ at:<br>
>><a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
>><br>
>>Kitware offers various services to support the CMake community. For more<br>
>>information on each offering, please visit:<br>
>><br>
>>CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
>>CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
>>CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
>><br>
>>Visit other Kitware open-source projects at<br>
>><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>>Follow this link to subscribe/unsubscribe:<br>
>><a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
><br>
><br>
> ________________________________<br>
> Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.<br>
> ________________________________<br>
> --<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
<br>
<br>
--<br>
Witold Eryk Wolski<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Pau Garcia i Quiles<br><a href="http://www.elpauer.org">http://www.elpauer.org</a><br>(Due to my workload, I may need 10 days to answer)
</div>