2

I am working in a GitLab C++ project and I am trying to have a automatic documentation generation on the code using Doxygen. I don't really know how to approach the problem.

Can I somehow include it in CMake to have a updated documentation in the project everytime someone builds it?

Or would it be better to have the server generate a documentation when someone pushes his Code?

Thanks for your help!

Lars
  • 21
  • 1
  • 3
  • Welcome to Stack Overflow! Have you tried the suggestions [here](https://stackoverflow.com/a/34879323/3987854)? – Kevin Apr 10 '20 at 14:32
  • 2
    Are you working with gitlab or github (discrepancy in title en text). Question is also what do you want to do with the documentation as the resulting documentation is derived information and should not land in a repository (probably only for a release). When you generate it during a build and want to store it in the repository this storage is done after the build and thus a new commit and thus again a new build ... – albert Apr 10 '20 at 14:49
  • I don't understand how Git is involved in this. Doxygen usually is run per build basis. Put it in CMake file and voila! – 0andriy Apr 10 '20 at 15:09
  • I'm working with GitLab. I would like to include the documentation in the wiki so it's easier for people to understand the project. – Lars Apr 10 '20 at 16:15

2 Answers2

0

Consider publishing the generated documentation on a GitLab Pages site (https://docs.gitlab.com/ee/user/project/pages/) You can then link to it from your Wiki to make it easy to find.

GitLab Wiki is stored in a separate Git repository (https://docs.gitlab.com/ee/user/project/wiki/) so that's why I think it would be cleaner to create a Pages site rather than to update the Wiki Git repo from the main Git repo.

Aleksey Tsalolikhin
  • 1,518
  • 7
  • 14
0

Yes, I think it is better to have a separate server build the documentation whenever someone pushes. If you have a Travis-CI account, you could configure an automatic deployment of your Doxygen documentation to the GitLab Wiki.

See here a link to a Gist example for GitHub, but should be expandable to GitLab: https://gist.github.com/vidavidorra/548ffbcdae99d752da02

ferdymercury
  • 698
  • 4
  • 15