C++ 如何为 Doxygen 设置输入目录?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15472320/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set an input directory for Doxygen?
提问by Roman
I have a directory in which all source and header files are saved. I would like to run Doxygen to generate documentation for these source code. However, I do not want to change anything in this directory (in particular I cannot add sub directories in which Doxygen documentation will be saved).
我有一个目录,其中保存了所有源文件和头文件。我想运行 Doxygen 来为这些源代码生成文档。但是,我不想更改此目录中的任何内容(特别是我无法添加将保存 Doxygen 文档的子目录)。
How can I achieve what I need?
我怎样才能达到我所需要的?
I think I need to do the following:
- I create and go to the 'documentation' directory.
- In this directory I execute doxygen -g
to create a template configuration file named "Doxyfile".
- Then, I think, I need to modify the Doxyfile to indicate that the source code is not in the current directory.
我想我需要执行以下操作: - 我创建并转到“文档”目录。- 在这个目录中,我执行doxygen -g
创建一个名为“Doxyfile”的模板配置文件。- 然后,我想,我需要修改 Doxyfile 以表明源代码不在当前目录中。
By the way, will the output be automatically (by default) saved in the directory in which Doxygen is executed?
顺便说一句,输出会自动(默认)保存在执行 Doxygen 的目录中吗?
回答by Roman
I found the answer already. The procedure is as follows:
我已经找到了答案。程序如下:
- Execute
doxygen -g
. Doxyfile will be generated. - Open Doxyfile and find
INPUT =
- After the 'INPUT =' put the name of the directory where the source code is located.
- Execute in the command line
doxygen Doxyfile
. - The output will be put into the directory where doxygen was executed.
- 执行
doxygen -g
。将生成 Doxyfile。 - 打开 Doxyfile 并找到
INPUT =
- 在'INPUT ='之后放置源代码所在目录的名称。
- 在命令行中执行
doxygen Doxyfile
。 - 输出将放入执行 doxygen 的目录中。