On 11.06.2014 20:04, Rick McGuire wrote:
Is it possible to add the ALL set of targets as a dependency for a target that is not part of the ALL set? We have some targets for building an installer that are not part of the default build, but must be invoked explicitly to build the installer. A successful installer build is really dependent upon having an up-to-date build, so I'd like to put in a dependency where a complete build is attempted if we're building the installer. I tried specifying ALL in the DEPENDS section, but it didn't like that. Is there a variable available that contains the list of ALL targets?


I don't think so.
See e.g. http://public.kitware.com/Bug/view.php?id=8438.

Perhaps you could reverse it?
Since the default "install" and "package" targets depends on "all" per default have "all" build everything that is actually required for the install.

Then add a custom target (add_custom_target(subset)) and set up dependencies for it to all targets that make up your subset.
e.g. add_dependencies(subset foo1 foo2)

Then (assuming e.g. make) "make subset" will build that specific subset.

Nils
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to