安装Doxygen

1
2
brew install doxygen
brew install doxygen --cask

安装Graphviz

1
brew install graphviz

配置doxygen

配置工作目录,源码目录,生成文档目录

配置DOT_PATH

1
2
➜  ~ which dot
/opt/homebrew/bin/dot

生成文档和函数调用图

查看函数调用图

1
2
3
4
➜  ff_doc ls
html latex
➜ ff_doc cd html
➜ html open index.html

文档生成目录下,打开html/index.html

可以看到生成的函数调用图