[cmake-developers] Is there a way in CMake to get a list of all CTest tests added with add_test?

Clifford Yapp cliffyapp at gmail.com
Mon Oct 3 11:17:25 EDT 2016


One of the functions we are wrapping in our build with CMake's "_"
prefix debugging mechanism is add_test.  Looking at why we do that, it
should be possible to avoid wrapping if we can get access in CMake to
the list of all test build targets defined with add_test.
Essentially, we need to add them to some custom target dependencies,
and it should be OK to do that after all tests are added if we can get
access to the list of targets within CMake.

Is there a property somewhere that exposes this list?

Thanks,
CY


More information about the cmake-developers mailing list