Closed Blady-Com closed 1 year ago
There is currently no way to control the compilation options of a client of a package from the compilation of the package itself. The compilation of an Ada unit is supposed to be standalone, and gprbuild relies on that. Unfortunately, there are some corner cases where this isn't true, with -gnatW8
indeed being one example. We don't have a solution for that at the moment other than adding -gnatW8
to client projects.
Here is a weird case of compiler options combined with two levels of GPR files: one on library level and one on main program level.
When I compiled the library all is fine: test_20230204_trans_opt.zip
But when I compiled the main program I got an error on library interface file:
It is as if the options of the library were not taken into account when withed in the main program.
Of course I can put all the library options in the main GPR but it is annoying to force library's users in that way.
How to specify the library GPR that the options must be enforced for interface files when compiling the main program?
See full example sources in attached archive.