export generated tests on cmake
Description
The names of the generated tests are not available after calling dune_add_system_test
and add_system_test_per_target
. Because of this, one has two options to modify properties of the resulting tests:
- Hand-write the test names in CMake.
- Reconstruct all possible names from the mini file.
The shortcomings of the two options are obvious: A lot of duplicated code and information for something that dune_add_system_test
and add_system_test_per_target
compute anyways.
Proposal
Two options arise here:
- Export the list of tests into a return variable.
- Attach tests to a property of the created targets
CREATED_TARGETS
.
The second case does not work on aliased targets (see !140 (merged)). Thus, I would go for the first one. Any other opinions on this?