Forum > Options
Out-of-Tree Builds With Lazarus?
guest60499:
Hello,
When using autotools it is possible to run ./configure in a directory that is not the top level project directory so as to not pollute a large source tree (e.g. the Linux kernel) with object files, and to maintain one source tree for all configurations.
Is this possible with Lazarus? I have tried to do some investigation, but all builds seem to happen in-tree.
Cheers,
guest
Leledumbo:
No, since Lazarus itself requires its own source code to fully work.
marcov:
While true, that doesn't mean binaries and source need to be mixed.
I think out of tree builds would be a good thing for both FPC and lazarus long term, but it is not easy to change the existing complex systems.
I think one of the problems is that C invokes the compiler for every file, so passes a destination dir for each file, allowing the makefiles to build a hierarchy by doing something like $CC ../src/dir/from -odir/from for every file.
While FPC compiles heaps of units in one run, you can set only one output dir, and all files end up there.
guest60499:
--- Quote from: marcov on November 18, 2017, 08:18:27 pm ---While FPC compiles heaps of units in one run, you can set only one output dir, and all files end up there.
--- End quote ---
That will be enough - I apologize, because it looks like I missed an existing setting. This Wiki section seems to describe what I want. The exact behavior is irrelevant as long as FPC (or the IDE) can resolve dependencies.
I asked as I don't want to pollute a fairly large source tree with files I don't mean to track with Git.
Leledumbo:
--- Quote from: guest on November 22, 2017, 04:13:01 am ---I asked as I don't want to pollute a fairly large source tree with files I don't mean to track with Git.
--- End quote ---
If this is your original intention, then just .gitignore *.o and *.ppu, perhaps *.rst and *.res as well.
Navigation
[0] Message Index
[#] Next page