如何在 doxygen 的注释中插入项目名称

How to insert the project name in a comment in doxygen?

本文关键字:插入项目 注释 doxygen      更新时间:2023-10-16

我经常在我写的评论中使用项目名称。但是,到目前为止,我对其进行了硬编码。现在我意识到,如果要更改项目名称,我将不得不浏览所有文档部分并进行更改。因此,我想问一下是否可以简单地在评论中引用项目名称,然后让doxygen稍后填写。

/*! brief This is the main function of the (project_name) project
*/
int main()
{
    return 0;
}

我认为您正在寻找的是环境变量,您可以在此处阅读。您要找的那个应该是 $(PROJECT_NAME) .要使用它,请参阅此答案。