I have a custom target, and I want it to depend on the default target (the one that is built with make).
make
add_custom_target(foo ....) add_depend
The default build target does not exist as a CMake target at CMake configure time. It is only exists in the generated build system. Therefore it is not possible to have the default target depend on a custom target.