I have a question regarding handling with tests.
currently my sources are build together with tests. the tests in the binary location could be executed via make test or ctest. So far so good.
Considering our Jenkins / Build Configurations i want to seperate build and tests. That means i want to build the tests with JOB A and execute them on JOB B.
So i have to bring the tests from A to B.
This could i do if i e.g. install the tests (adding install command in CMakeLists) and execute them and find them via scripts.
Is there another solution (e.g. undocumented CMAKE_PACKAGE_TEST ) or another approach that solves my problem in a way that i can use e.g. ctest in the other jobs too?
Other questions is about handling "extra files". So i have for example a test which relies on a test file. Currently i copy it as PRE_BUILD step into the tests binary dir, so it is available on test execution. Is there a better approach without using an install step?