[CMake] Can't run units test defined in subdirectories
Bill Hoffman
bill.hoffman at kitware.com
Fri Nov 28 11:17:57 EST 2008
Tron Thomas wrote:
> Okay, I changed the add_test command to:
> add_test(${Name} ${EXECUTABLE_OUTPUT_PATH}/${Name})
>
> Now, when I try to build the RUN_TESTS target I get results like this:
>
> Start processing tests
> Test project /Projects/MyProject/build
> 1/ 1 Testing TestLibrary ***Failed
>
> 0% tests passed, 1 tests failed out of 1
>
> The following tests FAILED:
> 1 - TestLibrary (Failed)
> Errors while running CTest
> make: *** [RUN_TESTS_buildpart_0] Error 8
>
> It is unclear why an error like this is occurring. The test application
> runs successfully when launched manually.
> How can I fix this problem so the test runs properly?
Run this in your build tree:
ctest -VV
That should give you more output.
-Bill
More information about the CMake
mailing list