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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 19:24:26  来源:igfitidea点击:

How to set an input directory for Doxygen?

c++inputdocumentationdoxygen

提问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 -gto 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:

我已经找到了答案。程序如下:

  1. Execute doxygen -g. Doxyfile will be generated.
  2. Open Doxyfile and find INPUT =
  3. After the 'INPUT =' put the name of the directory where the source code is located.
  4. Execute in the command line doxygen Doxyfile.
  5. The output will be put into the directory where doxygen was executed.
  1. 执行doxygen -g。将生成 Doxyfile。
  2. 打开 Doxyfile 并找到 INPUT =
  3. 在'INPUT ='之后放置源代码所在目录的名称。
  4. 在命令行中执行doxygen Doxyfile
  5. 输出将放入执行 doxygen 的目录中。