[CMake] different test cases

Bill Hoffman bill.hoffman at kitware.com
Thu Jul 15 22:48:47 EDT 2010


On 7/15/2010 6:05 PM, Tyler Roscoe wrote:
> On Thu, Jul 15, 2010 at 03:39:20PM -0500, "Jörg F. Unger" wrote:
>>   I'm using cmake to add a test environment to our project (with ctest).
>> Is there a possibility to generate to groups of test with different tags
>> in the makefile, so that after the generation of the makefiles the user
>> might say
>>
>> make test or make extensiveTest?
>
> CTest has a ton of flags for controlling which tests to run. We use -R a
> lot.
>
> If you can come up with a nice way to run your test set (e.g. can you
> put the string "extensive" in any test you want to run as part of the
> "extensiveTest" set?), you could train your developers how to use CTest
> directly. You could also add a custom_target that runs something like
> "${CMAKE_CTEST_COMMAND} -R extensive", which gives you the build target
> you're looking for.
>

You can also set the label property on a test.  This would allow for 
arbitrary grouping of tests.

-Bill


More information about the CMake mailing list