Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-11

Do not recompile all package dependencies

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ondrej Pokorny

If I change compiler settings for a project, all packages have to be recompiled as well.

Is there a chance to store the precompiled (object) files of the packages in a custom location for a project/build mode?

I tried to set -FU in "Additions and Overrides" to a custom absolute path but it doesn't seem to help. Furthermore I get warnings about duplicate files:

Note: Duplicate unit "actnlist" in "LCLBase 1.5",
ppu="P:\software\Lazarus_src\trunk\lcl\units\i386-win32\actnlist.ppu", source="P:\software\Lazarus_src\trunk\lcl\actnlist.pas"

etc.

Is there a way to achieve that packages won't be recompiled upon project/buildmode change? (= different directories for the precompiled files will be used). It takes quite long to recompile the LCL packages.

Ondrej

Reply by email

Mattias Gaertner
to Ondrej Pokorny
Show quoted text 5 lines
If I change compiler settings for a project, all packages have to be recompiled as well. Is there a chance to store the precompiled (object) files of the packages in a custom location for a project/build mode?

http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages

Show quoted text 7 lines
I tried to set -FU in "Additions and Overrides" to a custom absolute path but it doesn't seem to help. Furthermore I get warnings about duplicate files: Note: Duplicate unit "actnlist" in "LCLBase 1.5", ppu="P:\software\Lazarus_src\trunk\lcl\units\i386-win32\actnlist.ppu", source="P:\software\Lazarus_src\trunk\lcl\actnlist.pas"

The -FU option requires special treatments,
which is why it has its own field.

Mattias

Reply by email

Ondrej Pokorny
to Mattias Gaertner
Mattias Gaertner wrote

Thank you Mattias, this is exactly I was looking for but missed the option. It now works the way I want, with one cosmetic issue - the notes/warnings about duplicate units:

Note: Duplicate unit "actnlist" in "TestProj", orphaned ppu "P:\programs\TestProj\lib\i386-win32\Debug\actnlist.ppu" Note: Duplicate unit "actnlist" in "LCLBase 1.5",
ppu="P:\programs\TestProj\lib\i386-win32\Debug\actnlist.ppu", source="P:\software\Lazarus_src\trunk\lcl\actnlist.pas"

I am compiling all packages and the project into one directory (OutDir = "$(ProjPath)/../lib/$(TargetCPU)-$(TargetOS)/$(BuildMode)"). Is this a problem?

Ondrej

Reply by email

Mattias Gaertner
to Ondrej Pokorny
Show quoted text 13 lines
On 12.11.2015 11:05, Mattias Gaertner wrote: > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Change_the_output_directory_of_project_and_all_packages [...] Note: Duplicate unit "actnlist" in "TestProj", orphaned ppu "P:\programs\TestProj\lib\i386-win32\Debug\actnlist.ppu" Note: Duplicate unit "actnlist" in "LCLBase 1.5", ppu="P:\programs\TestProj\lib\i386-win32\Debug\actnlist.ppu", source="P:\software\Lazarus_src\trunk\lcl\actnlist.pas" I am compiling all packages and the project into one directory (OutDir = "$(ProjPath)/../lib/$(TargetCPU)-$(TargetOS)/$(BuildMode)"). Is this a problem?

It could be a problem if you have packages that require separate output directories and/or if the directory is shared with another project with different set of packages and/or settings.

The IDE assumes that packages are shared by projects and thus are separated from the project.
It's on my todo list to give only one warning in that case.

I added an example showing how to use the macros $(ProjPath) and ($PkgName) to compile packages into separate directories.

Mattias

Reply by email