Improve error message?

https://stackoverflow.com/a/30264765/16027269:

This is one of those examples where a simple note could make a developers live so much easier. No tests were found!!! Did you define enable_testing() before add_subdirectory()? –
lanoxx

How about improving error message?

CTest has no idea what’s going on, but I think this is probably quite a common reason (others being things like -L nosuchlabel or -R matchesnothing). I think if CTest sees zero tests defined that a note like this is probably appropriate.

2 Likes

Issue filed: https://gitlab.kitware.com/cmake/cmake/-/issues/24924