[CMake] Unit test is not executed from expected directory

Tron Thomas tron.thomas at verizon.net
Sat Dec 13 19:42:08 EST 2008


I am trying to use CMake to configure a project that has unit tests.  
One unit test requires supporting XML files to perform its test.  It was 
assumed that the test would be executed from the directory where the 
test application exists, so a target was added that copies the XML files 
to that location.

However, it turns out that the tests fails when the test target created 
by CMake is executed because CMake configured CTest to change to some 
subdirectory located beneath the execuable directory and perform the 
test in that location.

What is needed so that CTest will executing the test application in the 
expected location?



More information about the CMake mailing list