CMake add_test() parameter WORKING_DIRECTORY has no effect, test always run from the (by default) build directory
I have a project directory with multiple sub-projects, each with their own CMake setups. I’m using add_test()
in the CMakeLists.txt
of a library to add bash scripts for testing. I’m also making use of add_subdirectory()
to add the library to the setups of other sub-projects with their own CMake setups. To avoid path related confusion, I would prefer it if all bash scripts were run as if they were executed from a shared ‘base’, the project directory.