On Tue, 06 Dec 2005 11:08:23 +0100
Florian Klaempfl <[EMAIL PROTECTED]> wrote:
> Vincent Snijders wrote:
>
> > Yoyong Hernan wrote:
> >
> >> Hi All,
> >>
> >> I guess this question was already asked before but I just couldn't
> >> find the mail thread. Anyway, my question is about running a project
> >> inside the IDE. I noticed that every time I pressed "F9" it always
> >> goes to compile and link process even though there are no changes in
> >> code.
> >>
> >> Can anyone explain on this? If this is a bug, please let me know. I am
> >> trying to get on track again in Lazarus.
> >
> >
> > Checking changes is hard. Compiling it is the only to make sure that you
> > running the latest saved source.
It's true, only the compiler can decide, if recompilation is needed.
But at least the IDE could reduce the compiler execution. We could implement
the same mechanism as for packages:
- extending the project inspector to maintain all required files. Not only
units.
- creating the 'projectname.compiled' file after build
Then the IDE could simply test, if any source file is newer than the
.compiled file.
> The correct solution would be that the compiler doesn't recompile/link if
> there is an exe which is newer than any source. This isn't easy to achieve
> though, the compiler stored nowhere the information which include
> files/units are used by the main program file.
And the command line options are not stored in the exe.
For example: some options depend on macros. So, even if the whole project is
unchanged, and the exe is newer, a rebuild could be neccessary. That's why
the .compiled file is needed.
Then there are only two cases left, when the IDE test will fail:
- Some statically linked in libs changed.
- Something changed the filedates.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives