I wasn't able to determine what the behavior of doxygen is regarding the \mainpage
section, in two cases:
\mainpage
section, does it use any other page instead and if so how is this picked?\mainpage
section?The \mainpage
command specifies content used to customise the index page, so if you lack one it's just a blank page with the normal Doxygen header and footer.
I think the safest thing to say about having multiple \mainpage
commands is that it is undefined in the classic sense of yielding unpredictable results depending on version and platform. Similarly, I've had weird results when I accidentally created more than one \page
command with the same page name.
Further Thought
Prompted by answering another Doxygen question, remember you can get Doxygen to obey the preprocessor directives so you can have #if conditionals protect the multiple mainpage directives and run different config files over the same code base, where the config files define one of several flag values.
I have used this generate the docs from different perspectives approach to publish Macintosh and Windows-oriented versions of the same reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With