[CMake] Question about best practices for large Multi-stage builds

Thomas Taranowski tom at baringforge.com
Mon Aug 26 15:16:50 EDT 2013


I have the following build structure:

workspace/
    CMakeLists.txt # top level cmake
    component_a/
            CMakeLists.txt # component cmake
            src/ # source in here
    component_b/
            CMakeLists.txt # component cmake
            src/ # source in here

Now, I'm trying to implement a multi-stage build which does the following:
1) builds some external third-party dependencies.
2) auto-generate some code
3) build the source
4) package the result

To do this, I'd like to implement some top level build targets in cmake, so
I can run make auto_generate, make third_party, etc.

I can see a couple different potential ways to do this, but I've not been
able to google up  documentation that discusses the best method for
implementing this.  How are folks generally approaching this top level
build target issue?

 Do you have a top level add_custom_target that then calls each
subdirectories custom target of the same name, or is there some cmake
feature that supports this that I have not yet discovered?




Thomas Taranowski | 425-442-9209 | skype: thomas.taranowski |
baringforge.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130826/9fdef384/attachment.htm>


More information about the CMake mailing list