[CMake] CTest location of executables on Windows

Rolf Eike Beer eike at sf-mail.de
Sun Dec 14 02:22:00 EST 2014


Am Samstag, 13. Dezember 2014, 21:03:57 schrieb Clifford Yapp:
> We have a ctest setup in our software that runs a series of test
> executables , and the setup works well on Linux.  When trying to run
> the same setup on Windows, ctest reports the following:
> 
> Test project C:/Users/User/project-build
>               Start   1: bu_test_1
> Could not find executable tester_bu_test_1
> Looked in the following places:
> tester_bu_test_1
> tester_bu_test_1.exe
> Debug/tester_bu_test_1
> Debug/tester_bu_test_1.exe
> Release/tester_bu_test_1
> Release/tester_bu_test_1.exe
> Unable to find executable: tester_bu_test_1
> 
> The executable is actually located at Debug/bin/tester_bu_test_1.exe
> (all of our binaries are put in that subdirectory) but I can't figure
> out how to let CTest know to search there.  Does anyone know how to
> specify search directories for CTest to look in?

Use the second form of add_test(), the one where you explicitely give NAME and 
COMMAND. This may be called with a target name instead of only an executable 
location, so CMake will figure out automatically where the matching executable 
is located.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141214/9f803a25/attachment.sig>


More information about the CMake mailing list