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.