Author Topic: CodeBlocks workspace compiling  (Read 8356 times)

Offline wvteijlingen

  • Single posting newcomer
  • *
  • Posts: 6
CodeBlocks workspace compiling
« on: January 14, 2008, 02:56:22 pm »
Hello,

I compile my workspace from the commandline. It works fine, but i have one problem with it however. I have like 30 projects in my workspace and some of them may or may not compile. Codeblocks stops compiling projects, if one of them has errors. This is not what i want, because i do want to compile my other projects.

I've read the documentation on the Wiki, but i could not find it. I start my build as follows:

codeblocks.exe --rebuild drivers.workspace

Anyone an idea?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CodeBlocks workspace compiling
« Reply #1 on: January 14, 2008, 03:19:50 pm »
codeblocks.exe --rebuild drivers.workspace
Anyone an idea?
Sure: Why don't you setup a batch file and compile the projects one-by-one rather that the workspace? Thus the compilation would continue on an error in a project. Within a workspace it makes most of the time no sense to continue the build process. That's why C::B stops there - which is correct.
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 Jewe

  • Multiple posting newcomer
  • *
  • Posts: 70
    • Fit Trainer
Re: CodeBlocks workspace compiling
« Reply #2 on: January 15, 2008, 09:43:28 am »
I have the same problem, I want all dll's in my project to be compiled.
Maybe an solution in the middle by inserting an additional parameter that allows you continue?
This option is default false so the basic implementation is not changed.

cheers,

Jewe
Anything curved in the hardware can be straighten with software :D
OS: Vista64 + Debian(to play with)
Compiler: mingw IDE: Code::Blocks Nightly WX: 2.8.0

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: CodeBlocks workspace compiling
« Reply #3 on: January 15, 2008, 11:18:00 am »
I have the same problem, I want all dll's in my project to be compiled.
Maybe an solution in the middle by inserting an additional parameter that allows you continue?
This option is default false so the basic implementation is not changed.

cheers,

Jewe

Post a feature request then.
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: CodeBlocks workspace compiling
« Reply #4 on: January 15, 2008, 12:34:59 pm »
or a patch. This one bites me too all the time ;-)

Offline wvteijlingen

  • Single posting newcomer
  • *
  • Posts: 6
Re: CodeBlocks workspace compiling
« Reply #5 on: January 15, 2008, 02:46:10 pm »
Sure: Why don't you setup a batch file and compile the projects one-by-one rather that the workspace? Thus the compilation would continue on an error in a project.

Why do you think i use a workspace :)? We currently use a lot of Makefiles to simulate that specific behaviour, but it's a lot of work to keep track of this and thus error prone (i need to make sure for e.g. that i always update the Makefile after some changes to the linker and compiler settings). That's why i'd like to use workspaces instead.

Quote from: MortenMacFly
Within a workspace it makes most of the time no sense to continue the build process. That's why C::B stops there - which is correct.

And for us it's not. We would like to continue compiling, because the other projects are not dependent on each other.

I would very much like it if it becomes configurable, because it is useful to us. I've seen it is possible to do a feature request, so i will.

A patch would be even better. I will try to find some time to hack this one in.

Thanks.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: CodeBlocks workspace compiling
« Reply #6 on: January 15, 2008, 03:55:50 pm »
another use case where the continuation is nice :

Nightly build/automatic build system

- retrieve the sources for all programs/components out of the version control system
- 1 workspace building everything (note : each component can for example have multiple target, like 1 target per compiler, building with multiple compilers for code robustness)
- running unit tests (integrated for CB, so you can click to code jump to the offending line)
- at the end the workspace build log is mailed to admin

==> in this case if the build gets broken (compiler error or unit test failure), it would be very nice everything continues, because other products/components might succeed or they might also fail but due to other reasons, and once likes to have a much information as possible.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: CodeBlocks workspace compiling
« Reply #7 on: January 15, 2008, 04:07:59 pm »
Quote from: MortenMacFly
Within a workspace it makes most of the time no sense to continue the build process. That's why C::B stops there - which is correct.
And for us it's not. We would like to continue compiling, because the other projects are not dependent on each other.
It certainly is correct, because projects can depend on other projects.
If B depends on A, then A must be built before B. Thus, if A failed to build, then building B will re-launch the build process for A, which will go on forever.

What you ask for can only work reliably if projects can never have dependencies, so it is not the "correct way", it is at best an exceptional case.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline wvteijlingen

  • Single posting newcomer
  • *
  • Posts: 6
Re: CodeBlocks workspace compiling
« Reply #8 on: January 15, 2008, 04:13:27 pm »
It certainly is correct, because projects can depend on other projects.
If B depends on A, then A must be built before B. Thus, if A failed to build, then building B will re-launch the build process for A, which will go on forever.

It certainly is correct, for some but not all situations. It should be up to the developer to decide, not to an IDE. That's why i honestly think this should be configurable.

Offline Jewe

  • Multiple posting newcomer
  • *
  • Posts: 70
    • Fit Trainer
Re: CodeBlocks workspace compiling
« Reply #9 on: January 15, 2008, 05:08:27 pm »
@thomas:
The restarting of the compile is not done when using a makefile, something I can not select anymore.  :wink:
So I do not see the problem. could you please explain?

I would suggest the following procedure:
1. A Fails
2. B depending on A fails (Logical)
3. C compiles
4. D compiles and is depending on C
5. F fails because its depending on B

We use CodeBlocks for a bigger project, and it would make life a lot easier if all projects can be put in one Workspace.

Another option is to enable the makefile again, preffered by command line, so we use a python script to automatically generate the make file and call the GCC compiler directly.
Anything curved in the hardware can be straighten with software :D
OS: Vista64 + Debian(to play with)
Compiler: mingw IDE: Code::Blocks Nightly WX: 2.8.0