Getting Doxygen and MSVC TODO tags to work together

核能气质少年 提交于 2019-11-30 09:35:37
vladr

IIRC doxygen supports javadoc-style structural commands, i.e. you should be able to use @todo and \todo interchangeably, in the eventuality that MSVC will accept @todo as a task marker:

Structural commands (like all other commands) start with a backslash (), or an at-sign (@) if you prefer JavaDoc style, followed by a command name and one or more parameters.

Another option is to use FILE_VERSION_FILTER as a doxygen preprocessor, providing a custom script (or program), e.g. if you have Cygwin installed in C:\cygwin then the following will work nicely:

FILE_VERSION_FILTER = "C:\cygwin\bin\sed -e 's:// *TODO:@todo:g'"
HaMster

I don't know about the way VS treats these "TODO"s. But I think there is an easy way if it also recognizes \TODO as a to do item. In this case you might want to have a look at the doxygen documentation for \xref. This allows you to create tag/commands and link to a special section and a related page. \todo or @todo is defined as

\xrefitem todo "Todo" "Todo List"

What you can do now to create a custom "\TODO" or "@TODO" command is go to your configuration file or the doxywizard and add the line

\xrefitem TODO "Todo" "Todo List" 

to it. Maybe that helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!