Intermediate directory compiling

CodeLite installation/troubleshooting forum
jale
CodeLite Curious
Posts: 8
Joined: Mon Nov 23, 2009 3:59 pm
Genuine User: Yes
IDE Question: c++
Contact:

Intermediate directory compiling

Post by jale » Mon Nov 23, 2009 4:20 pm

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

User avatar
eranif
CodeLite Plugin
Posts: 6042
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Intermediate directory compiling

Post by eranif » Mon Nov 23, 2009 5:10 pm

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
Make sure you have read the HOW TO POST thread

jale
CodeLite Curious
Posts: 8
Joined: Mon Nov 23, 2009 3:59 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Intermediate directory compiling

Post by jale » Mon Nov 23, 2009 5:37 pm

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

User avatar
eranif
CodeLite Plugin
Posts: 6042
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Intermediate directory compiling

Post by eranif » Mon Nov 23, 2009 6:10 pm

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
Make sure you have read the HOW TO POST thread

jale
CodeLite Curious
Posts: 8
Joined: Mon Nov 23, 2009 3:59 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Intermediate directory compiling

Post by jale » Mon Nov 23, 2009 7:44 pm

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

jale
CodeLite Curious
Posts: 8
Joined: Mon Nov 23, 2009 3:59 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Intermediate directory compiling

Post by jale » Tue Nov 24, 2009 1:29 pm

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

Post Reply