10

I have my doxygen in my /utils directory, and my source is in another directory in the root(/code_with_doxygen), how could i make a relative path name for that since it's in a repository that will be on different places on other computers. I can't document the whole root because i don't want the directory /code_without_doxygen build too.

the project tree looks like this:

root utils code code_with_doxygen code_without_doxygen documentation 

right now i have the settings, but that doesn't seem to work:

FULL_PATH_NAMES = YES STRIP_FROM_PATH = ../ 

i can't seem to figure it out with: Relative files paths in doxygen-generated documentation

1
  • i fixed it in the .bat file. i navigated to the root map, then i run doxygen from there while i add some configurations to the doxygen_config with the %cd% command. then it looks like this: "( type utils\config_doxygen.txt & echo INPUT=%cd%\code\code_with_doxygen\ ) | doxygen.exe -" Commented Nov 12, 2015 at 8:21

4 Answers 4

4

The relative paths depend on the directory from which directory you are executing Doxygen. For example, if you have the following project tree:

+ project_root + documentation + config - doxyfile + pictures + output - run_doxygen.bat + code + code_with_doxygen + code_without_doxygen 

In this case, all relative paths have the root in the folder "documentation" because you are running the script "run_doxygen.bat" from this folder. So you would set the INPUT tag in the "doxyfile" to

INPUT = ./../code 

and the OUTPUT_DIRECTORY tag in the doxyfile to

OUTPUT_DIRECTORY = ./output 

The misleading thing is that even if the doxyfile is in the subfolder "config" the paths are NOT relative to the location of the doxyfile because the paths are relative to the location from where Doxygen is called. In this case it is the folder "documentation" because this is the location of the script which is calling Doxygen.

Sign up to request clarification or add additional context in comments.

Comments

1

Doxygen allows for including files into a doxyfile. You can generate this file using a script before actually calling Doxygen. The content has to look like this:

INPUT += path1 INPUT += path2 ... 

You seem to run Linux, I don't know the correct bash commands.

The file has to be integrated into your doxyfile:

INPUT = (project path) @INCLUDE = generated filename 

This will lead to Doxygen using the content of your generated file.

Comments

0

@gmug was right. Don't forget to add comment blocks in your code as specified by doxygen For python I needed to add this: """@package docstring""" at the beginning of the file.

Comments

0

I have been able to use relative paths in my doxygen.cfg file by setting INPUT to a string or set of strings. For example:

INPUT = "." "src" 

will tell doxygen to look in both the current directory and its subdirectory, $HERE/src.

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.