[CMake] ExternalProject_Add examples

Luigi Calori l.calori at cineca.it
Sat Mar 17 19:24:37 EDT 2012


On 17/03/2012 22.11, Marcus D. Hanwell wrote:
> On Sat, Mar 17, 2012 at 5:03 PM, Bill Lorensen<bill.lorensen at gmail.com>  wrote:
>> Folks,
>>
>> I've recently created a number of super builds using CMake's External
>> Project mechanism. Each external project requires some sort of
>> download, configuration, build and possibly install. The CMake defines
>> needed to correctly access the results of the external project vary
>> significantly. The trickiest part is find the proper download,
>> configuration and CMake defines.
>>
>> For example, for the Point Cloud Library (http://pointclouds.org/) I
>> created these external projects:
>> VTK - git, cmake, make; VTK_DIR
>> FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR
>> Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR
>> Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR
>> Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT
>> GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR
>>
>> Slicer4 has many more.
>>
>> Should we start collecting sample ExternalProject_Add files for
>> external projects?
> We have talked about doing this too (I have Eigen, Boost, GTest and
> others for example). The standard CMake based projects hardly seem
> worth it, but it depends on what you want to do with them I suppose.
> For the work we are doing in chemistry we have been working on an
> experimental superbuild that uses a common prefix in the build tree to
> install to, and then all we need pass in is CMAKE_PREFIX_PATH - this
> can make the logic significantly easier for dependent CMake projects
> as it will always search within the prefix first.
I did something similar, trying to collet all the build of stuff that I 
had to do in a single place powered by cmake
Used  CMAKE_PREFIX_PATH and a single source place where all the builds 
download  and expand

you can have a look at

https://hpc-forge.cineca.it/svn/CmakeBuilds/lib/

It's just for my use only, so really dirty and not properly checked, I' 
m also looking for good starting point for common stuff like Qt, boost 
and others
(I' tried to collect in the folder  Packages the tricky part of 
building  the components,) I' ve tried to define a dependency graph but 
it' still messy

anyway I would really appreciate a place where to share good "recipies" 
for CMake building packeges

Thanks
                   Luigi





>
> The Qt external project was pretty tricky too, and we are using that
> in several places along with smaller libraries like libxml2.
>
> Marcus
> --
>
> 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
>


-- 
Luigi Calori
SuperComputing Applications and Innovation Department
CINECA - via Magnanelli, 6/3, 40033 Casalecchio di Reno (Bologna) - ITALY
Tel: +39 051 6171509  Fax: +39 051 6132198
hpc.cineca.it



More information about the CMake mailing list