robotology / how-to-export-cpp-library

An OS-agnostic C++ library template in plain CMake.
MIT License
363 stars 54 forks source link

Generate a Doxygen TAG file #40

Open claudiofantacci opened 5 years ago

claudiofantacci commented 5 years ago

From #24.

diegoferigo commented 5 years ago

What do you mean with TAG, to handle the project version?

claudiofantacci commented 5 years ago

What do you mean with TAG, to handle the project version?

cc @traversaro

traversaro commented 5 years ago

See the Doxytag docs for more info. Basically they are useful to ensure cross-projects links in Doxygen documentation.

diegoferigo commented 5 years ago

I remember now that we discussed on this super cool feature long time ago. Since all our documentation is based on doxygen it would be great having a simple example running.

claudiofantacci commented 5 years ago

Do we have some sample code about this?

traversaro commented 5 years ago

See usage of YARP_DOXYGEN_TAGFILE and DOX_GENERATE_TAGFILE in https://github.com/robotology/yarp/blob/master/cmake/YarpDoc.cmake#L43 .

traversaro commented 5 years ago

Not sure if they do something similar in ignition-cmake, but I just saw that they have this supercool file that I guess make sure that std doxygen objects are linked to cppreference.com : https://bitbucket.org/ignitionrobotics/ign-cmake/src/default/doc/doxygen/cppreference.tag.xml .

traversaro commented 5 years ago

See also https://en.cppreference.com/w/Cppreference:Archives#Doxygen_tag_file .

claudiofantacci commented 5 years ago

Well, there is some work here to do. I reckon if we can make a standard template project for this it will be really super useful!

traversaro commented 5 years ago

Relevant ign-cmake PR: https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/65/doxygen-macro-for-downstream-packages-30/diff .

traversaro commented 5 years ago

Well, there is some work here to do. I reckon if we can make a standard template project for this it will be really super useful!

Definitely. Another tricky part is how to handle discovering and handling of TAG files of upstream libraries. This is something that the CMake config file could expose, but I am not aware of any C++ project that does this (that's the reason I wanted to check if they di something similar in the ignition projects).

Once we have something like that in place, we can generate in one shot all the doxygen docs for the packages in a superbuild, in a way that they cross link between one and another.