Previous: Other gnatmetric Switches, Up: Switches for gnatmetric


14.1.5 Generate project-wide metrics

In order to compute metrics on all units of a given project, you can use the gnat driver along with the -P option:

        gnat metric -Pproj

If the project proj depends upon other projects, you can compute the metrics on the project closure using the -U option:

        gnat metric -Pproj -U

Finally, if not all the units are relevant to a particular main program in the project closure, you can generate metrics for the set of units needed to create a given main program (unit closure) using the -U option followed by the name of the main unit:

        gnat metric -Pproj -U main