add_test: dependency to called exe built by add_executable / definition of ARGS in Makefile's test rule
The overall make
rule associated to add_test(...)
essentially looks like
ctest.exe --force-new-ctest-process $(ARGS)
.
Is it possible to
- define
ARGS
inCMakeLists.txt
on a test-by-test basis? - to automatically add a dependency (
target-exe <- test(exe)
) if a test runs an exe built by anadd_executable
target (with target name, say,target-exe
)? I realized that inCMakeTests.txt
target-exe
is replaced by the full path to theexe
. - add the feature to optionally add to
add_test
a cmake target - as opposed to actest
name - which should be updated if needed before running the test?
Hopefully I did not miss something obvious in the documentation.