Forum > General

unit output directory outside of project directory

(1/1)

Чебурашка:
Hello,
let us assume to create a brand new lazarus project "project1" on "/home/user/project1-source-folder".

As default on my lazarus version (below), the unit output directory is "lib/$(TargetCPU)-$(TargetOS)" and the target file name is "project1". Both inside "/home/user/project1-source-folder".

For reasons related to the later usage of rsync, I'd find more comfortable that the compiler's output is placed on a dedicated folder, say "/home/user/project1-build-folder".

To achieve this I simply set unit output directory to "../project1-build-folder/lib/$(TargetCPU)-$(TargetOS)" and target file name to "../project1-build-folder/project1" (relative paths here, but I could also write absolute ones equivalently).

It works perfectly as output of compiler is where I want.

The only difference is that when I work with the latter configuration, when lazarus has to create the destination folders for the first time, it does ask for confirmation, while it doesn't do the same in "standard" configuration.

Is it correct? Is it possible to disable the confirmation somehow?

Чебурашка:
No idea?

marcov:
This is one of the things (relative paths) Lazarus does better than Delphi.

Are the default dirs simply always made by the project, even if you specify others?

Чебурашка:

--- Quote from: marcov on May 25, 2023, 01:43:28 pm ---Are the default dirs simply always made by the project, even if you specify others?

--- End quote ---

No, sorry, I did not explain myself clearly.

I attached a tgz. In the folder there are 2 projects, one standard with output inside project folder, the other outside. At first compile one does not ask anything, while the other asks confirmation.

Navigation

[0] Message Index

Go to full version