ctest: Cleanup for invalid argument handling
Cleans up some of the changes in !9383 (merged)
- Backs out an unrelated change in
cmCTest.cxx
that was intended to fix #23982 (closed) and will be incorporated in a future MR. - Changes the error message to
Unknown argument
to be more specific, and for consistency withcmake --not-a-valid-argument
output.
Edited by Martin Duffy