[CMake] unit tests include in "all" but not install

Scott Aron Bloom scott at towel42.com
Mon Mar 23 11:11:57 EDT 2015


I use google test, which can output XML/Junit style (we have another reporting system, so junit isn't necessary)..

However, what "Cmake" rules do you use to have to have the test dependent on the output file, and not the running of the test?

Scott

From: Miller Henry [mailto:MillerHenry at JohnDeere.com]
Sent: Monday, March 23, 2015 6:44 AM
To: Scott Aron Bloom; CMake ML
Subject: RE: unit tests include in "all" but not install

I have setup our unit tests to output a junit report, and the junit report is what is in the all target.  Thus my unit tests don't run on a make install if they have run during the original make. If anything was rebuilt during the make install only the affected tests are run.

This of course depends on your test framework having the ability to create an output file.  (but there are enough useful things to do from a junit output that I suggest you should refuse a framework that doesn't)

From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron Bloom
Sent: Friday, March 20, 2015 6:24 PM
To: Scott Aron Bloom; CMake ML
Subject: Re: [CMake] unit tests include in "all" but not install

For those who couldn't understand my jibberish.. I apologize, never send email from a phone...

Ill restate...

In general, I want all my unit tests to be built when I do a make all, but I really don't care if they are up to date for a make install.

Is that a possibility?  Ie, add the exclude from all attribute, that is really an exclude from install?

Scott

From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Scott Aron Bloom
Sent: Friday, March 20, 2015 16:05 PM
To: CMake ML
Subject: [CMake] unit tests include in "all" but not install

In general, I want unit tests, are build when I do a make all, but I really don't care if they are up to date for a install..

Is that a possibility?

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150323/1289a271/attachment.html>


More information about the CMake mailing list