Marco A.
Marco A.

Reputation: 43662

Doxygen - wrong order of modules in the pdf

I created a documentation with doxygen and organized the modules into groups with the @defgroup and @ingroup directives. Now I have a hierarchy as follows:

Source1.h
/// @defgroup MainGroup This is the main group

Source2.h
/// @ingroup MainGroup
/// @defgroup SubGroup1 This is a subgroup

Source3.h
/// @ingroup MainGroup
/// @defgroup SubGroup2 This is another subgroup

Source4.h
/// @ingroup SubGroup2
/// @defgroup SubSubGroup ...

The problem is, when generating the PDF, that the module index has page numbers in the wrong order and the groups not following the hierarchy, e.g.

MainGroup......................5
SubSubGroup....................20
SubGroup1......................10
SubGroup2......................15

while I would like something as

MainGroup......................5
SubGroup1......................10
SubGroup2......................15
SubSubGroup....................20

I always have to manually re-order the \include directives in the refman.tex file after generated the latex documentation.

Is there any way to fix this behavior and have doxygen generate the module index with the groups in the right order?

Upvotes: 0

Views: 687

Answers (1)

Cheeseminer
Cheeseminer

Reputation: 3068

Typically when I have this sort of problem I have to list the source files in an explicit order in the Doxyfile INPUT statement, rather than use a wildcard or just a folder name.

INPUT = Source1.h Source2.h Source3.h Source4.h

Upvotes: 1

Related Questions