[Cmake] ENABLE_TESTING and ADD_TEST

Amitha Perera perera at cs.rpi.edu
Thu Aug 23 16:25:45 EDT 2001


Currently, ADD_TEST appends an exectuable name to a file
DartTestFile.txt. This file is only cleared by the final pass of
ENABLE_TESTING(). This means that if the CMakeLists.txt uses ADD_TEST
but doesn't have ENABLE_TESTING, the same tests are appended to
DartTestFile every time cmake is run (for example, by make depend).

I think ADD_TEST and ENABLE_TESTING should work hand-in-hand: if
ENABLE_TESTING has not been run, then ADD_TEST sliently does nothing.

Another option is to remove the ENABLE_TESTING command altogether,
making it always on. The possibility of tests will then always be
available.

Comments?

Thanks,
Amitha.




More information about the CMake mailing list