4
votes

So I have a collection of projects that are documented with doxygen (and it has to be doxygen). I run doxygen separately for each project and use the "linking to external documentation" http://www.doxygen.nl/manual/external.html in order to connect the documentation. For example I import the tagfile for a library project in another project where it is used. This way links to the library classes are automatically generated when they are used in the other project documentation.

Now for the problem, say I have a library libA that is used in another library libB. libA and libB have a main page each. In the documentation of libB I import the tagfile for libA. So far so good, but now I have a third project, lets call it app, which uses both libA and libB. I import both tagfiles and links works for both, BUT it also complains that libA main page anchors are duplicate. I realise they are, since they are imported both through libB and as libA directly, however if I don't import libA tagfile in app then links for libA classes are not created.

Now the resulting documentation seems to be fine if I just import both tags and ignore the warnings, but the warnings will clutter the log file so I might miss some other warning for example that I forgot to document a method or something.

So, any ideas how to solve this? Is this a bug in doxygen? Can I suppress this specific warning? Is there a better way to document a collection of projects like this with doxygen?

1

1 Answers

1
votes

I'm no expert, but I think you could get around this problem by running doxygen twice for libB. The first time, set GENERATE_TAGFILE but not TAGFILES, so that the generated tagfile is just for libB. Then modify the Doxyfile to link the libA tagfile as normal through TAGFILES, but disabling GENERATE_TAGFILE so that you don't overwrite the clean version of the libB tagfile.

If it behaves like it should, you'll get a tagfile just for libB with no references to libA that you can use when running doxygen on app, but the actual html documentation for libB will properly link to the documentation for libA.