News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Dependency Target

Started by puneet_m, March 10, 2008, 08:23:02 PM

Previous topic - Next topic

puneet_m

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

MortenMacFly

Quote from: puneet_m on March 10, 2008, 08:23:02 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...).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

puneet_m

#2
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

puneet_m

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