[CMake] CTest: Glob files to include in coverage report with 0% line coverage

Andreas Schuh andreas.schuh.84 at googlemail.com
Wed Jan 25 12:55:00 EST 2012


BTW In my own project, I am using a bit more old-school approach to
document also CMake code. I wrote a Doxygen filter which transforms
the CMake code into C code which Doxygen can generate an HTML
documentation for. The source of this filter implemented in Python can
be found at http://sourceforge.net/p/sbia-basis/code/ci/77b8ae5d7ec2b201366c09f295d09076b9927527/tree/src/tools/doxyfilter-cmake.py.

See, for example,

http://www.rad.upenn.edu/sbia/software/doxygen/basis/trunk/html/group__CMakeAPI.html
http://www.rad.upenn.edu/sbia/software/doxygen/basis/trunk/html/group__BasisSettings.html
http://www.rad.upenn.edu/sbia/software/doxygen/basis/trunk/html/group__BasisSettings.html#gab06414cfca0fcb6d2202e2e8a23cf009

On Wed, Jan 25, 2012 at 12:34 PM, Andreas Schuh
<andreas.schuh.84 at googlemail.com> wrote:
> I am not sure where I found info on this variable, but the ITK/VTK
> projects are always a good resource on the latest trends/development
> in CMake/CTest/CPack.
>
> Further, for anyone interested, please note the difference in
> CTEST_EXTRA_COVERAGE_GLOB, which lists glob expressions as used by
> file (GLOB), and CTEST_CUSTOM_COVERAGE_EXCLUDE, which uses regular
> expressions. In the beginning, I wasn't very clear about this, but in
> either case you would need to use "/test/*" or "/test/.*",
> respectively, to include/exclude all files in some "test/" directory.
>
>
> Regarding this variable, I was eventually looking at the source code
> and figured that indeed only source files in the source tree are
> considered.
>
> Related bug report: http://public.kitware.com/Bug/view.php?id=12910
>
> Andreas
>
> On Tue, Jan 24, 2012 at 7:12 AM, David Cole <david.cole at kitware.com> wrote:
>> On Tue, Jan 24, 2012 at 2:51 AM, Eric Noulard <eric.noulard at gmail.com> wrote:
>>> 2012/1/24 Rolf Eike Beer <eike at sf-mail.de>:
>>>> Andreas Schuh wrote:
>>>>> Hi,
>>>>>
>>>>> Setting CTEST_EXTRA_COVERAGE_GLOB in the CTestCustom.cmake file can be
>>>>> used to add additional files which shall be included in the coverage
>>>>> report. This is useful to ensure that files which are not covered by
>>>>> any test are still reported with 0% line coverage.
>>>>
>>>> Oh, interesting variable. How can it be that there is absolutely zero
>>>> documentation for in CMake?
>>>
>>> Because ctest and cpack documentation are very far from being
>>> documented as cmake is ?
>>> E.g. current ctest and cpack do not have --help-variable-* support?
>>>
>>> If you want to help please try my "stage/ImproveCPackDoc-reloaded" branch
>>> and may be read this: http://public.kitware.com/Bug/view.php?id=10067
>>>
>>> The technique I propose may be used for cpack, ctest, etc...
>>>
>>> --
>>> Erk
>>> Membre de l'April - « promouvoir et défendre le logiciel libre » -
>>> http://www.april.org
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>
>>
>> There is zero documentation for all of the ctest related variables. We
>> need somebody who can write a bunch of documentation someday to fill
>> in that blank.
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list