[CMake] generating CTest tests

John Drescher drescherjm at gmail.com
Fri Aug 28 13:11:01 EDT 2009


On Fri, Aug 28, 2009 at 12:57 PM, Aditya
Herlambang<aditya15417 at hotmail.com> wrote:
> Hello,
> I am really a total noob in this CTest stuffs, I read the documentation and
> it says that I need to use the ADD_TEST method to test an executable right?
> the format is the following:
> ADD_TEST(test1 "../build/executable" "1")
>
> where test1 is the name of the test and 1 is the argument passed to the
> executable. Question is how do I specify if the test pass then print
> something, otherwise
> print the other thing?
>

You should not be printing anything. I mean from your main return 0
for success any thing non zero for failure.

John


More information about the CMake mailing list