We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
Doxygen 本身是通过执行命令行命令启动的,因此您只需要一种在签入时执行命令的方法。您没有提及您正在使用的 SCC 工具、开发环境或操作系统,因此很难给出具体答案。
通常的方法是使用运行持续集成的构建服务器。也就是说,当您签入代码时,构建服务器会注意到签入,获取新代码,然后执行构建(在本例中为 Doxygen 文档)。有许多可用工具可以自动化PC来创建构建服务器。使用哪一个取决于您正在使用的操作系统和源代码管理包等。 (如果您没有/想要专用的构建服务器,您也可以在您自己的 PC 上在后台运行这样的工具)。
如果您只想在签入时在自己的 PC 上进行构建,那么您可以检查源代码控制软件,看看是否可以收到签入通知。某些 SCC 可能提供针对某些事件执行脚本或命令的能力,因此可以让它为您执行命令。
最后,许多人只是在他们的开发环境中设置一个执行 Doxygen 的工具/宏,然后手动运行它。在 Visual Studio 中(例如),您甚至可以编写一个宏,通过一次按键即可执行签入和执行 Doxygen。
Doxygen itself is started by executing a command-line command, so you only need a way of executing a command when a check in occurs. You don't say anything about the SCC tool, Dev Environment or OS you are working with, so it's hard to give a specific answer.
The usual way to do this would be using a build server running Continuous Integration. That is, when you check in code, the build server will notice the check in, get the new code, and then execute a build (in this case of Doxygen documentation). There are many tools available that will automate a PC to make a build server. Which one to use would depend on things like the OS and Source Control package you're using. (If you don't have/want a dedicated build server you could also run a tool like this on your own PC in the background).
If you just want the build to occur on your own PC when you check in, then you could investigate your source control software to see if you can be notified of the check-in. Some SCCs may offer an ability to execute a script or command for certain events, so it may be possible to get it to execute the command for you.
Lastly, many people just set up a tool/macro within their development environment that executes Doxygen, and then they run it manually. In visual Studio (for example) you could even write a macro that would do both the Check in and execute Doxygen from a single keypress.
如果您希望使用 doxygen 进行更多控制,则还必须生成 xml 文件并创建一个程序来分析 xml 输出文件以检查所有约束,并在违反约束时停止构建。
这项技术需要一些开发工作,但这是我知道用 doxygen 做你想做的事情的唯一方法。
If you want more control with doxygen, you have to generate also xml files and create a program that analyze the xml output files to check all your constraints, and stop the build if a constaint is violated.
this technique needs some developement effort but it's the only way that i know to do what you want with doxygen.