I’m trying to understand most of the uses of this macro in the CMake sources. If the macro is passed more than its one argument, those other arguments are passed at the end of the ctest
command line, preceded by --test-command
. That totally makes sense to me when I see cases like this one, where those arguments clearly form an executable command.
ADD_TEST_MACRO(MSManifest ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>)
But the vast majority of uses of the macro pass a single optional argument that is the same as the name of the test and of a subdirectory containing its own CMake project, e.g.:
ADD_TEST_MACRO(CommandLineTest CommandLineTest)
which should result in an invocation like
ctest --build-and-test ... --test-command CommandLineTest
What makes CommandLineTest
an appropriate --test-command
?
Thanks!