Page 1 of 1

Intermediate directory compiling

Posted: Mon Nov 23, 2009 4:20 pm
by jale
Hi,

Great ide

I'm working now with version 3399 compiled from svn on a linux amd64, with ubuntu 9.04
I've compiled from source code due to http://codelite.org/forum/viewtopic.php?f=3&t=662#p2900 (I have to test this fix)


I have a project with some files outside my project path
I'd like to generate all objs in my project tree

I tryed with.... Project|setings|general|intermediate directory

But the mak file generated has...

Objects=../../../../../src/my_dir/$(IntermediateDirectory)/my_file$(ObjectSuffix)

And same for objects and clean
##
## Objects
##

##
## Clean
##

It works fine, but I'd like to put all the objects in my project tree instead of creating Debug and Release folders on many places

I think it would be better in this way...

Objects=$(IntermediateDirectory)/my_file$(ObjectSuffix)


and is how in previus version worked



kind regards

Re: Intermediate directory compiling

Posted: Mon Nov 23, 2009 5:10 pm
by eranif
This behavior was changed due to several bugs with the previous way of handling objects:

Consider the following:

Project-> src1/a.cpp
src2/a.cpp

now, placing the objects under a single intermediate directory, will cause name conflicts (we got here 2 a.o...) which causes link error - I myself encountered this bug, as well as other users).
Using the source tree to keep the object files, solves this issue

Hope you understand my motivation for this change

Eran

Re: Intermediate directory compiling

Posted: Mon Nov 23, 2009 5:37 pm
by jale
Hi, I understand

I like to put the temp files (objs for example) in a temp directory at the same level than source directories

example...

bin
doc
src
temp
temp/Debug
temp/Release


Then, I configure src to work with svn or git

with

src
src/Debug
src/Release

I have to manage carefully the svn or git repositories in order to don't commit objs files


What do you thing about...


Objects=$(IntermediateDirectory)/virtualFolder/myFile.$(ObjectSuffix) ?

Perhaps we could deal these kind of problems with virtual folders configurations



kind regards

Re: Intermediate directory compiling

Posted: Mon Nov 23, 2009 6:10 pm
by eranif
Still, I currently you can have the same file with different paths under the same virtual folder - so it requires user intervention and people like that this kind of things is done automatically - and using the virtual folder solution is done manually

Eran

Re: Intermediate directory compiling

Posted: Mon Nov 23, 2009 7:44 pm
by jale
Yes, you are right

But IMHO it will happen very occasionally

Usually, the virtual folder has a set of files from same directory (especially if you import files with assistant)

You can have virtual folders and virtual subfolders, It's difficult to have several files in just one virtual folder from several sources


thanks

Re: Intermediate directory compiling

Posted: Tue Nov 24, 2009 1:29 pm
by jale
In order to have both options, the configuration could be something like this...

$(source_file_dir)/$(intermetiate_dir)

And it would produce

Objects=../../../../../src/my_dir/$(IntermediateDirectory)/my_file$(ObjectSuffix)

but $(intermetiate_dir) would produce...

Objects=$(IntermediateDirectory)/my_file$(ObjectSuffix)

The default configuration would be the first one



thanks