[CMake] How to specify working directory for unit tests?

Tron Thomas tron.thomas at verizon.net
Thu Dec 18 00:40:36 EST 2008


I need to be able to run a certain unit from a specific directory so 
that it will be able to find some supporting file that are needed for 
the test.  However CTest insists on launching the test from a different 
location.

I tried using the --build-run-dir and --build-exe-dir flags.  Neither of 
them would change the unit test directory.

What can be done to specify the directory where CTest should launch the 
unit test?



More information about the CMake mailing list