There is a compiler directive to disable warnings, but this can only be set in the project parameters, in which case this applies to all units or the block itself, and in this case it applies only to this unit.
So, you have a few options left.
An unrealistic option that does exactly what you ask for:
Thus, the only solution would be to disable warnings in your project, and then enable them in all of your own departments using this directive.
The simplest and most realistic option:
Compile the units once and use only the DCU, removing the source from your library path. This is easiest if you do not want to edit them.
You can add them to your viewing path, which is different from the library path. DCUs are used in this case, but Delphi can still find the sources, so you can navigate through them during debugging.
A small advantage is that the creation of your project is faster, because these units do not need to be recompiled in each assembly.
The best way:
Stop using these devices at all. Units with so many warnings are poor software and can cause serious problems.
Other solutions:
- Postpone your wishes not to change the modules and add all the compiler directives to them.
- Resolve warnings
source share