0

TL;DR

How do I add a CMake dependency on the default build target (all)?

Long version

I have a project that consists of a number of libraries and executables which should always be built. Additionally, there is a handful of small optional executables. I added a custom target extended-all with dependencies on the optional executables. Now I would like extended-all to depend on the default build target (whence the name extended-all!), so that everything gets built if make extended-all is invoked. As things stand now, CMake only builds the direct dependencies of the optional executables.

Is it possible to achieve this?

This question is similar in spirit, but the answer does not apply to my case.

Community
  • 1
  • 1
Arek' Fu
  • 826
  • 8
  • 24
  • That request has been out there for a while (see also e.g. [here](http://stackoverflow.com/questions/8073614/how-to-add-dependency-in-cmake-targets)). You could add your support to the corresponding CMake feature request: [Issue #8438: add_dependencies() for "build-in cmake targets"](https://gitlab.kitware.com/cmake/cmake/issues/8438). – Florian Jun 30 '16 at 10:11
  • @Florian thanks. Support added. – Arek' Fu Jun 30 '16 at 10:46

0 Answers0