Should this work this way or am I doing something wrong?
I have this code in my project source:
{$IFDEF DEBUG}
ADebugUnit,
{$ELSE}
ARelaseUnit,
{$ENDIF}
I want ADebugUnit to be used when in debug mode but AReleaseUnit to be used when compiling in release mode. This works great EXCEPT when I select to add a new unit to the project. When I do that it will basically process the code and only keep the unit that pertains to whichever configuration the project is currently set to.
For example, if the configuration is set to Debug then after adding a new unit to my project the above code changes to just:
ADebugUnit,
Or if my configuration is set to Release it will change to the following after adding a new unit:
ARelaseUnit,
I have to always restore it back to the conditional statements after adding a new unit. Is there a way to accomplish this without having the add new unit interfere?