[cmake-developers] CTest CTEST_TESTFLAGS env var?

Stephen Kelly steveire at gmail.com
Fri May 17 09:38:01 EDT 2013


Brad King wrote:

> On 05/16/2013 04:56 PM, Stephen Kelly wrote:
>> I run Qt unit tests like this:
>> 
>>  qmake && make check
>> 
>> The make check target runs cmake and ctest. However, this does not take
>> advantage of the ability of CTest to run tests in parallel. Rather than
>> trying to shoehorn in a -j argument via the qmake files, I'd prefer to
>> set a CTEST_TESTFLAGS variable in my shell and be done with it for all
>> projects.
>> 
>> Is such a thing acceptable? How would it be implemented?
> 
> Teach cmCTest::HandleCommandLineArguments to track whether an explicit
> -j option was given and if not then after the loop calling it is done
> check the environment variable.

Ok, I've done that in the ctest-parallel-env branch in my clone. Initially I 
was going to make something more-general for command line flags, but I guess 
this way is ok too. The more general solution would be much more difficult.

Can I merge that one to next?

Thanks,

Steve.




More information about the cmake-developers mailing list