[CMake] Custom build command for documentation

Stefan Buschmann s_buschmann at gmx.de
Tue Jan 8 07:50:33 EST 2008


Hi,

You can just define custom dependencies to include all your 
documentation in one "doc" target.

E.g. I have a target "Docs" in my project:
  ADD_CUSTOM_TARGET(Docs)

And then in each subdirectory that contains a documentation project, I 
write e.g.:
  ...
  ADD_CUSTOM_TARGET(Docs-Doxygen
    DEPENDS   ${PROJECT_TARGET_CHM}
  )
  ...
  ADD_DEPENDENCIES(Docs
    Docs-Doxygen
  )

This will cause "make Docs" to make all documentation projects at once.

Bye,

Stefan


Alexander.Camek at elektrobit.com schrieb:
> Hi all,
>
> currently I can generate for some subdirectories my Latex and Doxygen documentation. This is done like it is described in the cmake FAQ.
> What I now want to do is to collect all this commands of the subdirectory and put it in an unique common build command, e.g. make doc.
> The idea is that the user can generate all documents with one common command, like cmake currently does during source build when a user types make all.
>
> The problem is that when I add a custom target it doesn't know about targets given by a ADD_SUBDIRECTORY command.
>
> Consider following structure:
>
> \src
>  \modules
>   \module1 -> some docu
>   \module2 -> some docu
>   \module3 -> some docu
>  \tools
>   \tool1 -> some docu
>   \tool2 -> some docu
>
> Then think about the user who types in "make doc" and all documents of the whole build is generated.
>
> Is it with current release (cmake 2.4.7) possible to generate such a command for generating documentation?
>
> If not so. Does the next big step of cmake (cmake 2.5 or 2.6 ???) consider something like a doc command in it? Similar to the install command which collects all informations of the to installable files. 
>
> Thanks for your help.
>
> Greetings
>
> Alexander
>
>
> ----------------------------------------------------------------
> Please note: This e-mail may contain confidential information
> intended solely for the addressee. If you have received this
> e-mail in error, please do not disclose it to anyone, notify
> the sender promptly, and delete the message from your system.
> Thank you.
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list