I'm porting some code from one framework library to another, which requires me to comment out large sections of code just to get it to compile, and then carefully restore them. In the meantime, I get tons of warnings because of all the commented-out code. So I decided to write a quick include file to suppress them:
{$MESSAGE WARN 'Warnings suppressed for unported unit with commented-out code'}
{$WARN NO_RETVAL OFF}
{$WARN USE_BEFORE_DEF OFF}
I included this in all the units that are giving me tons of warnings, but now when I compile, the compiler's returning the message as follows:
[DCC Warning] unfinished.inc(1): W1054 Warnings suppressed for unported unit with commented-out code
I'd like it to tell me that the warning is coming from the unit doing the including, not the include file itself. Is there any way to do that, or to work the name of the unit into the message, without actually moving the $MESSAGE directive out of the include file and into every single unit where I did this?