On 1/20/2011 3:19 PM, kent williams wrote:
I kinda know the simple answer is 'no.'  I hope there's a creative
*couch*sneaky*cough* way to do this.

I'm trying to build CableSwig as a external project as part of ITK.  I
have this working for a single-process build.  It works in that case
because the ExternalProject_add happens textually before all the
add_subdirectory clauses at the bottom of ITK's top level
CMakeLists.txt file.

If you run a parallel build, CableSwig gets downloaded and built in
parallel with subdirectories that need CableSwig to build, so the
compile fails, obviously.

The problem is that subdirectories aren't targets, and can't depend on
CableSwig.  What I need is a trick to fake out CMake such that it
guarantees the CableSwig subproject get built completely before moving
on into subdirectories.

Any ideas?  Or am I just abusing the very spirit of CMake?

You are abusing the spirit of external project. To do this you would want to create one project that has two external projects:

CableSwig
ITK

Then you can have ITK depend on CableSwig. You really can not mix external project with regular targets that expect that stuff to be built first.

-Bill
_______________________________________________
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

Reply via email to