force doxygen to pick one from versioned files

女生的网名这么多〃 提交于 2020-01-25 21:42:56

问题


Just started using doxygen today. How would you go about this.

Given following dir structure

-rootDir
    -dirA
        -dirAFile_ver01
        -dirAFile_ver02
        -dirAFile_ver03
        -dirAFile_ver04
    -dirB
        -dirBFile_ver01
        -dirBFile_ver02
        -dirBFile_ver03
    -dirC
        -dirCFile_ver01
        -dirCFile_ver02

My expectations from doxygen are to take only last version of file from single dir e.g. dirAFile_ver04 from dirA, dirBFile_ver03 from dirB etc. I've read about FILE_VERSION_FILTER tag, but I'm not able to make it work. Using CMD command for listing last file (sort by name)
FILE_VERSION_FILTER = FOR /f %i IN ('dir /o:n /b') DO (set LAST_VER=%i echo %LAST_VER%)

Also would it be possible if all those files would lie in single directory?

-rootDir
    -dirAFile_ver01
    -dirAFile_ver02
    -dirAFile_ver03
    -dirAFile_ver04
    -dirBFile_ver01
    -dirBFile_ver02
    -dirBFile_ver03
    -dirCFile_ver01
    -dirCFile_ver02
    -justFile_0.0.1
    -justFile_0.0.2

Thanks in advance


回答1:


The FILE_VERSION_FILTER (http://www.doxygen.nl/manual/config.html#cfg_file_version_filter) is definitely not suitable for the purpose you have. Having different versions of a file in a directory is something that is not done, it is a task of a version control system (how do you handle this during builds?).

The FILE_VERSION_FILTER gets from a version control system or any other command you put there some information and outputs it to standard output and uses it in some output (for headers).

Maybe you can accomplish something with INPUT_FILTER (check the filename in your script to see if it is the last one and if so output it, otherwise output nothing. I didn't test anything here). Another possibility might be with FILTER_PATTERNS but I doubt this as it uses a regular expression and I'm not aware of any regular expression that can do this.



来源:https://stackoverflow.com/questions/43969845/force-doxygen-to-pick-one-from-versioned-files

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