[cmake-developers] Built-in tag support for FindDoxygen

Robert Dailey rcdailey.lists at gmail.com
Wed Jun 28 21:14:01 EDT 2017


Doxygen supports linking external documentation together:
https://www.stack.nl/~dimitri/doxygen/manual/external.html

Using doxygen_add_docs(), it doesn't provide built-in support for tag
files. I'm thinking this would be beneficial since the way the
function is designed encourages modular documentation. At least, I
have my projects structured like this (targets):

A
A_doxygen
B
B_doxygen
C
C_doxygen

I have 1 doxygen target per real library target. And each library has
dependencies on others. When library C uses something from A, I want
C_doxygen to link to the tagfile generated by A_doxygen.

At the moment I'm accomplishing this by adding a target property to
each real target to keep track of target dependencies. Example:

add_library(C ...)
target_link_libraries(C A)
set_property(TARGET C PROPERTY TARGET_DEPENDENCIES A)

When I'm building A_doxygen target (using doxygen_add_docs()), I
specify DOXYGEN_GENERATE_TAGFILE. Then in C_doxygen, I specify
DOXYGEN_TAGFILES to point to the one output by A_doxygen.

I don't like keeping target properties to query the dependency tree,
but this is the best I could come up with. Is there value in
incorporating this into FindDoxygen.cmake? If so, I'd like to
contribute it, if it's useful.

Would love feedback and advice on this!


More information about the cmake-developers mailing list