Search code examples
adagnatgprbuild

Determine required Ada source files for project build


Imagine a large Ada project build with GPRbuild and a single *.gpr project file. The source directory contains many Ada package specification and body files but a few of them are not required to build the project (an executable).

Does GPRbuild offers something like a report function listing all files that were required to the build the project? This would allow me to remove unusued source files.


Solution

  • You can play around with

    -gnatu List units for this compilation

    like this:

    gprbuild -P foo.gpr -cargs -gnatu