I have now implemented per-target dependencies feature INTERNALLY, with minimal change to the SDK. I have greatly modified the compiler plugin so we may test it a little (in HEAD) before it comes to the v1 release. I said internally, that means that some gui/interface stuff should now be developed to cope with the modifications I have done. I have updated the MSVC importers to add the dependencies in targets, so these are the only ways to test inter-target dependencies for now.
Since I'm going to take vacations very soon till end of August, I do not have time to implement the GUI stuff for now. So I post my TODO list so as people could implement the missing features if they want a dependency handling to come very soon.
Added in the SDK, in ProjectBuildTarget:
- a reference to the parent project for each target, so as to switch to the correct project before compiling. Now, we could retrieve the fullname of a target: "projectname - targetname" with the method GetFullTitle(). This is usefull to choose the targets to compile in the Batch build dialog or the targets to depend on in the dependency dialog
- AddTargetDep(ProjectBuildTarget* target) && GetTargetDeps()
To add/retrieve the (direct) dependencies of the current target
Added in the compiler plugins, CompilerGCC
- support for batch compile/clean
- support to calculate the dependency list for targets
- CompileDeps, CleanDeps, RebuildDeps which are dependency-enabled counterparts of Compile, Clean and Rebuild
- Redirected the OnCompile/OnClean to use the dependency-enabled methods instead of the other ones.
TODO (for me):
- update XXXAll so as to respect a correct build order of the targets
- redirect OnRebuild?
TODO:
- implement a dialog to set the target dependencies, that is which target the current target depend on.
This could be implemented with, at the top, a choice of the project/target whose dependencies are to be edited and below a checklistbox of the targets to depend on (using GetFullTitle so the project name appear too). Note that, as a first step we may propose all other targets, but in Visual Studio, the choice is restricted to targets that do not make a circular dependency loop, to prevent some problems during compilation. So prepare to extend the dialog/list to support this feature, I will not be hard to implement after.
- implement a batch build dialog for the compiler plugin Checklistbox with all targets for which we want to make an action. Two action buttons: clean and compile, that respectively perform batch clean and batch
compile. Maybe more buttons? Ok/close button.
- update the menus accordingly
- make the dependencies (and external deps too, see RFE) saved in the codeblock project/workspace files.
- provide a way to link the dependent target automatically instead of adding them into the LinkLibs of the target. This is not really important for now but should be an added value. I things it implies modifying the directcommand/makefile commands to allow that.
As a side note, I find that the compiler plugin is especially not clear, it's really a pain to add something in it and very error prone. I would not be surprised if there were/will be some bugs in it. I'll post something about this later.