[CMake] add_test does not work as documented

Jesper Eskilson jesper.eskilson at iar.se
Tue Sep 21 10:34:58 EDT 2010


On 09/21/2010 01:30 PM, David Cole wrote:

> $<CONFIGURATION> only works with the "add_test(NAME mytest COMMAND
> MyCommand)" form of the add_test command.
>
> But, when you use that form, you have to run "ctest -C Release" or
> "ctest -C Debug" to choose a configuration when you run the tests.
> Otherwise, tests added with that form are skipped if ctest is called
> without a -C argument.

Ok, thanks.

(I didn't find any mention of this. Maybe the add_test() documentation 
ought to say something about it.)

--
/Jesper



More information about the CMake mailing list