[CMake] add_test command in a sub-directory

romain.jacquet.dev at free.fr romain.jacquet.dev at free.fr
Fri Oct 2 03:48:45 EDT 2009


Selon "Nathaniel Waisbrot (Cont ARL/CISD)" <nathaniel.waisbrot at arl.army.mil>:

> Try moving the ENABLE_TESTING() call to the top-level CMakeLists.txt,
> before any calls to add_subdirectory().  Add_test() can stay where it
> is.
Thanks it works perfectly. But the behavior of ENABLE_TESTING() is disturbing. I
think it will be great if this issue was present in the documentation (i.e.
cmake --help ENABLE_TESTING).

Thanks for all.


More information about the CMake mailing list