[CMake] ADD_TEST command path

Sylvain Prat sylvain.prat at laposte.net
Tue May 10 03:53:57 EDT 2005


Hi,

I'm trying to setup a (working hehe) test program with an ADD_TEST command but I do not have yet succeed to have 0 errors with the run_test target. The problem is related to the dynamically linked dll used by the program, for an out-source build with Visual C++. Here are my interrogations and suggestions :

1. Why is the test program launched from the build_dir instead of the executable_dir ? This behavior, which IMHO is not really intuitive, causes me a headache since I wanted to load some dynamically linked librairies (parts of the whole project) from the executable/library directory. I solved the problem right now (using argv[0]), but I think it should be documented at least.
2. Does CTest use the PATH environment variable when launching the executable ? It seems not since my program is not able to load some dlls (not in the executable dir but in the system path) when run from the run_test target, but work when run from the command line ! What's the problem here ?

Cheers,
Sylvain

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)





More information about the CMake mailing list