Author Topic: workspace continue build after error  (Read 4623 times)

Offline Martin K.

  • Multiple posting newcomer
  • *
  • Posts: 86
workspace continue build after error
« on: November 28, 2012, 01:15:57 pm »
Hi,

Is it possible to continue a build after one (or more) of the projects raises an error?
Currently the build process stops after the project wich throws error and dont contniue with the next one.

Martin

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: workspace continue build after error
« Reply #1 on: November 28, 2012, 01:58:16 pm »
Why would you need this?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Martin K.

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: workspace continue build after error
« Reply #2 on: November 28, 2012, 02:33:11 pm »
Why would you need this?

A Workspace with 40 projects, 3 of them doesn't compile, be the rest will. A build/rebuild workspace stopps after the first failed project,so i have to build the rest manual one after the other.
Changing the compiler version for a bigger software packet.

Martin

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: workspace continue build after error
« Reply #3 on: November 28, 2012, 02:52:18 pm »
What I do when this happens is to rename the targets of the broken projects. This way they are skipped by C::B.
In the future I'll try to add an option to disable certain projects, but currently I don't know of such feature.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: workspace continue build after error
« Reply #4 on: November 28, 2012, 03:43:41 pm »
A Workspace with 40 projects, 3 of them doesn't compile, be the rest will. A build/rebuild workspace stopps after the first failed project,so i have to build the rest manual one after the other.
Changing the compiler version for a bigger software packet.
There is an easy way:

You you use virtual targets to group targets across projects across a workspace together. So if you create in all your project a virtual targets that covers all targets that build but not the ones that don't build you get what you want. Easy!
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 Martin K.

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: workspace continue build after error
« Reply #5 on: November 29, 2012, 06:50:10 am »
Hi,

Thanks for this tipps.
I have currently 3 targets in every project. 2 real (release and debug) and one virtual (all, includes release and debug). Now i have to create two mor virtual targets in every project (for release anddebug) and include only those projects in the three virtual targets that compiles fine. I have to build only the virtual targets, and not the real ones. right?

Martin

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: workspace continue build after error
« Reply #6 on: November 29, 2012, 09:20:14 am »
I have currently 3 targets in every project. 2 real (release and debug) and one virtual (all, includes release and debug). Now i have to create two mor virtual targets in every project (for release anddebug) and include only those projects in the three virtual targets that compiles fine. I have to build only the virtual targets, and not the real ones. right?
Yes + yes. That's a common and convenient way to setup and organise targets. Note that a "virtual target" actually does compile the real target(s) it s connected to, but only these - its like grouping.

Also, I don't know why some of your targets do not compile - but if they are for a different platform, you can also use the platform flag to exclude such targets from the build. C::B checks if the build is performed on a compatible platform and skips targets that are defined to be for another platform. The default settings is "All", so all targets are (by default) compatible with all platforms. For you, this might not be the case. So this may be an even easier / more intuitive solution.

Another option you have is to set these targets to a type named "commands only" which does no compilation at all then.

Why do the targets not build? Its pretty weird after all...
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: workspace continue build after error
« Reply #7 on: November 29, 2012, 09:23:29 am »
Why do the targets not build? Its pretty weird after all...
Because he has upgraded his compiler...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: workspace continue build after error
« Reply #8 on: November 29, 2012, 09:33:43 am »
Because he has upgraded his compiler...
Al-right, so why then not just fix the code step-by-step? That's the actual root of evil then, isn't it? ??? Here, a break of the build is actual really the best that can happen.
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 Martin K.

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: workspace continue build after error
« Reply #9 on: November 29, 2012, 09:43:26 am »
I have currently 3 targets in every project. 2 real (release and debug) and one virtual (all, includes release and debug). Now i have to create two mor virtual targets in every project (for release anddebug) and include only those projects in the three virtual targets that compiles fine. I have to build only the virtual targets, and not the real ones. right?
Yes + yes. That's a common and convenient way to setup and organise targets. Note that a "virtual target" actually does compile the real target(s) it s connected to, but only these - its like grouping.

Also, I don't know why some of your targets do not compile - but if they are for a different platform, you can also use the platform flag to exclude such targets from the build. C::B checks if the build is performed on a compatible platform and skips targets that are defined to be for another platform. The default settings is "All", so all targets are (by default) compatible with all platforms. For you, this might not be the case. So this may be an even easier / more intuitive solution.

Another option you have is to set these targets to a type named "commands only" which does no compilation at all then.

Why do the targets not build? Its pretty weird after all...

Here is a team of more than only one programmer and i have setup the new project files and a workspace for them.
Now there are porting there libs and apps step by step to the new compiler. In the meantime, some libs and/or apps doesn't compile. Thats all.
The finest way whould be to disable these projects in the workspace and to show this disabled status in the workspace. So they can go through the workspace and see what projects are ported currently and what to do next.

Martin