1

This is a complicated scenario, but I thought I'd ask in case someone has done this or ran across this issue before.

I have specified the input files specifically as shown here:

INPUT = ../groupsrc/WebPage.cc

However, inside WebPage.cc there is another include that's within the same directory:

#include "WebPageIf.hh"

I would like WebPageIf.hh also included in the documentation. Now before you jump to the obvious answers please understand the context here.

  1. The .cc files to include in the INPUT are extracted from a makefile
  2. The directory that contains Webpage.cc has many other .cc files and .hh files that I DON'T want in the documentation
  3. I CAN'T just add WebPageIf.hh to the INPUT list because this is just a simple example of a larger issue. I have 100's of .cc files to include in the INPUT list above that are generated by a script, but the makefile doesn't explicitly list the .hh files needed for the .cc files.
  4. I CAN'T just do *.hh or *.cc because then many headers and source files will be included in the documentation that should not be and don't relate what I'm trying to document.
  5. I tried using SEARCH_INCLUDES and listing the INCLUDE_PATH and INCLUDE_FILE_PATTERNS, but it won't include these as part of the generated documentation (which makes sense because of the description: "The INCLUDE_PATH tag can be used to specify one or more directories that contain include files that are not input files but should be processed by the preprocessor.")

I basically want the include files found by SEARCH_INCLUDES to actually be included in the documentation.

I don't know if what I'm asking is possible, but I thought I'd throw it out to the community if there is a solution that I have not come across.

ls6777
  • 386
  • 1
  • 5
  • 14
  • In point 1 you wrote about how you got the `.cc` files from the Makefile, but isn't it possible in a second step to extract the `.hh` from the list of `.cc` files obtained in the first step? – albert Nov 12 '19 at 19:04
  • @albert Not sure I'm following. Are you suggesting getting the .hh directly from the .cc file? Like parsing the .cc file? – ls6777 Nov 12 '19 at 20:21
  • Indeed, but parsing is a bit overdone a `grep` and `sed` or small python program will do. – albert Nov 13 '19 at 09:33
  • @albert Yes... this is possible, but a lot of extra work because I have #defines for different builds in the .hh and .cc files (e.g. BUILD_BD, BUILD_GUI). So all the includes in the file don't apply. Also, because some of the .hh include other .hh that also may need to be part of the documentation, this becomes a recursive exercise. – ls6777 Nov 13 '19 at 18:10
  • Since Doxygen already is "compiling" the INPUT provided (in a way), I thought it may be able to intelligently include the proper .hh files in the documentation. – ls6777 Nov 13 '19 at 18:12
  • 1
    I see what you mean. As far as I know this is currently not possible. By head I don't know whether or not this is possible at all (I think it should be possible) and is acceptable to be added. Probably the best is to create an, enhancement, issue in the doxygen issue tracker on github. – albert Nov 13 '19 at 18:25
  • @albert will add enhancement issue for doxygen on github. I was hoping there was a way to do this in doxygen, but I've created a python script to sort of do this. It's not very elegant though and requires a python C99 pre-processor library :/ Thanks for the feedback and help! – ls6777 Nov 14 '19 at 07:04
  • 1
    doxygen issue: https://github.com/doxygen/doxygen/issues/7400 – albert Nov 14 '19 at 09:35

0 Answers0