User forums > Help
[suggestion] build workspace can not compile files from 2 projet in same time
(1/1)
Freem:
This is not an issue, just a suggestion.
Currently, it seems that using the "build workspace" command just build sequentially all projects. It works nice, but it could be enhanced: when you you have a workspace with several small projects, there is (or I know) no way to compile individual C++ files at the same moment if they belongs to a different project.
By example, you have a big project A, which rely on few libraries and load some plug-ins. If you modify a header of the plug-in API, you will have to recompile most of plug-ins and their host. Currently, C::B is not able to compile in same time 2 plug-ins, because it waits for other to finish.
For the linking step, it makes sense, as linker needs to know symbols from projects on which it depends, but compilation does not.
But I guess it could be very complex to do.
oBFusCATed:
--- Quote from: Freem on October 04, 2012, 03:53:01 pm ---But I guess it could be very complex to do.
--- End quote ---
Not that complex. You have to setup proper dependencies.
Patches welcome.
MortenMacFly:
--- Quote from: Freem on October 04, 2012, 03:53:01 pm ---Currently, it seems that using the "build workspace" command just build sequentially all projects. It works nice, but it could be enhanced: when you you have a workspace with several small projects, there is (or I know) no way to compile individual C++ files at the same moment if they belongs to a different project.
--- End quote ---
There is, maybe: If you create a virtual target with the same name in each of the (desired) projects you can compile against this target. This will compile only the files that belong to these individual targets.
Freem:
--- Quote from: oBFusCATed on October 04, 2012, 08:40:23 pm ---
--- Quote from: Freem on October 04, 2012, 03:53:01 pm ---But I guess it could be very complex to do.
--- End quote ---
Not that complex. You have to setup proper dependencies.
Patches welcome.
--- End quote ---
I thought it could be complex because there could be log issues, if things are made in same time, no?
I mean, I guess simply giving instructions like (on linux)
--- Code: ---g++ -o onefile.cpp [...] &
g++ -o another.cpp [...] &
--- End code ---
could mess the parser when it come to know which project was successfully compiled or not? If files are from same project and one fail, it is not a problem, the project failed however, but with multiple ones?
Honestly, I am still a little afraid of multi-processing and issues they can generate.
@MortenMacFly:
I fear that I have never used virtual targets... What is their role? Grouping multiple targets of same project? I did not find anything on wiki.
[edit]
When I validate this message, I have a text that spawn and disappear in a red bubble: "le text est trop long [...]" (I made the exact quote... English would have been something like "Text is too long [...]") but had no enough time to see everything.
False positive or ?
MortenMacFly:
--- Quote from: Freem on October 05, 2012, 04:01:15 pm ---@MortenMacFly:
I fear that I have never used virtual targets... What is their role? Grouping multiple targets of same project? I did not find anything on wiki.
--- End quote ---
Read here:
http://wiki.codeblocks.org/index.php?title=Creating_a_new_project#Virtual_Targets
Basically you can not only group targets of a project, but also 1..n targets across 1..m projects in a WS.
See also here:
http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks
Navigation
[0] Message Index
Go to full version