[CMake] different test cases

Tyler Roscoe tyler at cryptio.net
Thu Jul 15 18:05:23 EDT 2010

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

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.


More information about the CMake mailing list