Author Topic: Dependency Target  (Read 3312 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Dependency Target
« 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
« Last Edit: March 10, 2008, 08:36:30 pm by puneet_m »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Dependency Target
« Reply #1 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...).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Dependency Target
« Reply #2 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
« Last Edit: March 10, 2008, 08:46:35 pm by puneet_m »

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Dependency Target
« Reply #3 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