Graeme Geldenhuys ha scritto:
On 29/01/2008, Giuliano Colla <[EMAIL PROTECTED]> wrote:
So my question is still open. There's a way to make the IDE/compiler
aware of the change of conditionals? I'm the only one with this requirement?
I have also noticed that issue, mostly with my IFDEF DEBUG lines. I
used to use application wide defines passing in -d<whatever>. This
caused lots of problems, like you described. I now instead use defines
per unit. Below the compiler mode (top of unit) I place a new line
{$Define DEBUG} to enable debuging per unit. If I want to disable such
debugging, comment that line as follows: {.$Define DEBUG}
Obviously this works for me, because that's the only IFDEF's I have in
fpGUI. Others usage may vary. My 2c worth.
Unluckily my mileage varies a lot. We have a codebase which is used to
build different applications. Roughly 30 to 35 units and tens of
thousands of lines.
When an application is reasonably different from others, it gets its own
directory and all customization is made there.
But when some applications are very similar, and maybe go to the same
customer, we may have two or three projects on the same directory, which
are using the same source files, and a few conditionals scattered around
to pick up the proper options where appropriate.
If one has last built project1, and then does some editing and just
compiles (instead of building) project2, project2 may inherit units
which where compiled with project1 conditionals, generating a mix-up,
which may go undetected.
That's why I was looking for a way to avoid this problem.
Thanks, however,
Giuliano
--
Giuliano Colla
Whenever people agree with me, I always feel I must be wrong (O. Wilde)
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives