How can I visualize Fortran (90 or later) source code, e.g. using Graphviz?

前端 未结 3 1340
我寻月下人不归
我寻月下人不归 2020-12-24 14:12

I\'ve been thrown into a large Fortran project with a large number of source files.

I need to contribute to this project and it would seem prudent that I first under

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 14:57

    I would recommend doxygen, which automatically generates documentation from source code (and is free). Usually you add some markup to comments describing your functions and variables. However, you can just run doxygen on undocumented source files, provided you set EXTRACT_ALL to YES in the configuration file, and have it create create relationship diagrams for all your functions (i.e. this function call these functions and is called by these other functions).

    You need GraphViz installed to get diagrams generated and have the HAVE_DOT option set to YES in the configuration file.

    See the doxygen documentation for graphs and diagrams for more information and this example class documentation for a example of the output generated.

    Edit: Of course for Fortran you should set the OPTIMIZE_FOR_FORTRAN option to YES in the configuration file.

提交回复
热议问题