15

I want to include folder in doxygen documentation.

I have tried \page and \include but it hasn't worked, does anyone know how to do it? Here is the tree :

 +root -+controllers --- category.php -+models --- categories.php - mainpage.php 
5
  • Is this useful: comments.gmane.org/gmane.text.doxygen.general/8425 ? Commented Jun 14, 2011 at 8:10
  • I'd like to know what the folder contains. Images? Classes to be documented? HTML files to be included? Commented Jun 14, 2011 at 10:51
  • @cweiske the folder contains classes to be documented Commented Jun 14, 2011 at 12:30
  • @Matt Ellen thanks for the link :) Commented Jun 14, 2011 at 12:30
  • @Matt Ellen I've tried like the example on the link, the page it appears and can not be clicked, and within that folder there are class files that must be documented, i've edited my question with add the tree of folders and files. Thanks Commented Jun 14, 2011 at 14:32

2 Answers 2

26

To add to the comments on your question, the \page command will add pages into your documentation that you have manually written. I.e. if a source file contains a \page declaration it will add the contents to the documentation index. You can add extra help here, such as:

/*! \page overviewpage Architecture Overview * * \section memorymanagement Memory Management * * Some writing you want to appear as a help page in the documentation here. */ 

The \include command will include a copy of a file as a source code block.

I think you're actually asking how you get Doxygen to add multiple source directories. As long as the recursive setting is YES, which is not the default, it should work fine for your structure if you've set the root folder as the Doxygen input.

RECURSIVE = YES 

If you haven't, you can add different folders like this, with paths relative to the Doxyfile file.

#--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src test/src 
Sign up to request clarification or add additional context in comments.

Comments

0

The solution by @Martin Foot doesn't work when there are spaces in your folder names because then doxygen treats those as separate filepaths. If you quote the whole thing, that doesn't work. Taking inspiration from here ... Excluding directories for Doxygen

Here is my proposed solution, where you quote each folder, and use the multiline syntax

INPUT = "src" INPUT += "spaced folder/test/src" 

Reference: https://www.doxygen.nl/manual/config.html

the += operator can be used instead of = to append new values to the list. 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.