[Lazarus] Applying optimization to the project units

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Nov 25 17:21:39 CET 2010


On Thu, 25 Nov 2010 18:42:40 +0300
Max Vlasov <max.vlasov at gmail.com> wrote:

> On Thu, Nov 25, 2010 at 5:10 PM, Mattias Gaertner <nc-gaertnma at netcologne.de
> > wrote:
> 
> >  > Create a project that uses this package and conditionalunit, place a
> > button,
> > > call ShowProjDependentMessage.
> > >
> > > If we did nothing, the message will be This is second version'. If I go
> > the
> > > the project Build macro and chose version 1 then ..
> > > - Ctrl-F9 the message is still the same (second version),
> > > - Build all -> still the same,
> > > - Compile in the package window, compile project - still the same.
> >
> > >
> > Fixed. Please test.
> >
> > Mattias
> >
> >
> Mattias, it seems still something doesn't work, I tried with simple make,
> then make clean all, the same result
> 
> version Lazarus 0.9.29 r28480 FPC 2.4.2 i386-win32-win32/win64
> 
> - The route only works if I change the property, go to package, press
> compile, return to project, compile the project, the phrases change in this
> case in the program I run

Fixed.

 
> - An observation making comparison with previous version difficult: the
> macro block started to work only when I changed '1' to 1 in the expression
> (removed quotes). The screenshot at wiki shows True in quotes ('True'), but
> in my case only removing make it work at least the way I described in the
> first observation.

Fixed.

 
> - The package now correctly shows the right computed compiler options if I
> change the macro value in the project options (changed -FuVer2 and -FuVer1
> accordingly).

:)

 
> - Still neither Build nor Build All of the project affects the result of
> compilation. 

It should now.

> So I have a feeling that the logic behind "Rebuild the package
> as needed" doesn't take new macro option into account. "Build all" shows
> some information about compiling the package (condpkg.pas(10,18) Hint: Unit
> "conditionalunit" not used in CondPkg), but the result of the project
> compilation different to what it does when I explicitly press Compile in the
> package window.


Mattias




More information about the Lazarus mailing list