I'm struggling with how to handle dependencies between external projects in
a
superbuild.  The issue is different than simply ensuring that one gets
built before
another using the DEPENDS keyword -- that's trivial.

Suppose I have two external libraries A and B, where B depends on A.  It is
not
always possible to correctly define variables like A_LIBRARIES that feed
into the
externalproject_add for B that anticipate what will come out of the A
configure/build.
There are sometimes additional link libraries that only come to light after
A is
actually configured.

How do people handle these situations?  I'm thinking of a multi-pass
approach
where one runs cmake/make twice.  The first installs A skipping the
dependent B.
The second builds B (skipping a found A) using correctly set variables from
a
FindA module.

Incidentally, is it kosher to have a Find module invoke a find_package?
There are
examples in of this in standard Find modules.  This creates problems in the
superbuild context, where say A is found, but rejected by the superbuild
because
of missing features, for example, but FindB finds A and uses it.

Thanks for your advice.

-Neil
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to