Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: puneet_m on March 10, 2008, 08:23:02 pm

Title: Dependency Target
Post by: puneet_m on March 10, 2008, 08:23:02 pm
In a project I have 5 targets in a following way

A->B->C->D->E.

The above diagram shows that A is dependent on B, B is dependent on C and so on.
So when I build a project, will Code-Block take care of the order in which they are to be built?

Thanks,
Puneet
Title: Re: Dependency Target
Post by: MortenMacFly on March 10, 2008, 08:34:27 pm
So when I build a project, will Code-Block take care of the order in which they are to be built.
Hoping that this is actually your question (you do know what a question mark is, right?!):
Yes, C::B can handle project dependencies. You can setup them in the project properties. Targets are built in the order of their appearance.
There are two types of dependencies: Dependencies between projects (what you most likely want) and dependencies to external objects (for example libs, but also object files or any other type of files...).
Title: Re: Dependency Target
Post by: puneet_m on March 10, 2008, 08:43:12 pm
Suppose my target Dependency chain is A->B->C. Then if I try to build just target A(not the whole project), will it also build B and C? How do you specify target A is dependent on B. Do we have to place them in the correct order in project properties menu or their is some other way as well?

I don't see GetTargetDeps function in projectbuildtarget.cpp being used anywhere. So does that mean target dependencies are not getting stored?

Thanks for the help
Title: Re: Dependency Target
Post by: puneet_m on March 12, 2008, 05:03:05 pm
I have two Project A and B
Project A has following targets ---> x,y
Project B has following targets ---> q,w

How should I specify that target x is dependent on target q?
How should I specify Project A is dependent on Project B?

Thanks,
Puneet