[Ctk-developers] Documentation of CMake macros and functions

Sascha Zelzer s.zelzer at dkfz-heidelberg.de
Tue Apr 12 11:37:28 EDT 2011


On 04/12/2011 04:39 PM, Jean-Christophe Fillion-Robin wrote:
> You rocks :)  +1
>
> We should definitively create the project: commontk/CMakeDoxygenFilter

Yes, we could do that. But we will probably not need a direct dependency 
to it (see comments below).

>
> Do you think you could some sort of simple unit test.
> This would :
>  - allow  us to make sure the filter is working
>  - provide people with an example

Good point. There is an example for a doxygen config file in the README.

>
> Should the project CMakeDoxygenFilter be an external project of CTK if 
> doxygen is installed on the machine ?
>
> How doxygen can be extended ? Should the filter be added to the path ? 
> Installed ?

The project contains a CMake function 
(https://github.com/saschazelzer/CMakeDoxygenFilter/blob/master/FunctionCMakeDoxygenFilterCompile.cmake) 
which is intended to be copied to the using project (CTK) and which 
should download the source code (it is just one cpp file) and compile it 
with TRY_COMPILE. This way, the documentation could be generated without 
building CTK first. Due to missing SSL support in CURL which ships with 
CMake (on Windows), downloading files from github is not possible (same 
issue as with the CDash driver script...). For MITK I copied the CMake 
function *and* the source code to MITK (I don't expect the source code 
to change very often).

After configuring CTK, the executable will have been built in the binary 
tree and Doxyfile.txt.in config file will be configured to contain a 
reference to the executable.

I don't know if we should invest the extra effort of creating another 
external project dependency to avoid the copying of the source file...

Thanks,
Sascha

>
> Thanks
> Jc
>
> On Tue, Apr 12, 2011 at 10:28 AM, Sascha Zelzer 
> <s.zelzer at dkfz-heidelberg.de <mailto:s.zelzer at dkfz-heidelberg.de>> wrote:
>
>     Hi Folks,
>
>     I have always been a little bit annoyed by the lack of
>     documentation for custom CMake macros and functions (both in our
>     own projects and in CTK).
>
>     Doxygen supports the idea of so called "input filters" which take
>     an input file and transform it into code which Doxygen can
>     understand and parse. I wrote such an input filter for CMake files
>     (see https://github.com/saschazelzer/CMakeDoxygenFilter/) and we
>     are using it now in MITK. It allows you to document your CMake
>     macros/functions inline using all of Doxygens commands.
>
>     For example, it looks like this:
>     http://docs.mitk.org/nightly-qt4/namespaceCMake.html#aed923b6189222cc8f9800cbc3486d7f5
>     (we certainly still have a lot to do concerning the documentation
>     of our macros... :-) )
>
>     I would like to integrate this stuff into CTK, any
>     comments/suggestions?
>
>
>     Thanks,
>
>     Sascha
>     _______________________________________________
>     Ctk-developers mailing list
>     Ctk-developers at commontk.org <mailto:Ctk-developers at commontk.org>
>     http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>
>
>
>
> -- 
> +1 919 869 8849
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20110412/ab354e22/attachment.html>


More information about the Ctk-developers mailing list