Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: oBFusCATed on December 01, 2011, 02:00:12 pm

Title: Multiple outputs paths for a build target
Post by: oBFusCATed on December 01, 2011, 02:00:12 pm
Hello,

Hard would be to implement multiple output paths for a build target?
I have a very complex setup here and using a post build steps is not that feasible.
And as far as I remember using post build steps was not reliable at least in V-Studio.

My setup is something like this:
Workspace 1:
1. project producing libA.so goes to a dir1
2. project using libA.so from dir1

Workspace 2:
1. project producing libA.so that goes to a dir2
2. project using libA.so from dir1

What I want is to be able to setup project 2.1 to generate the libA.so file in both dirs: dir1 and dir2

I'll try the post-build step for now, but I'll be happy if we can add such a feature.
What do you think?
Title: Re: Multiple outputs paths for a build target
Post by: MortenMacFly on December 04, 2011, 11:01:49 am
What I want is to be able to setup project 2.1 to generate the libA.so file in both dirs: dir1 and dir2
Keep in mind that copying the file is less expensive then linking twice, usually. So I think the post build step is just the right thing to do.

Besides, you can use macros based on target variables for the output folder. As variables can be setup per target, the output folder would be changed "on-the-fly". More complex would be to use a command only target to setup target variables or envvars and bind this to certain projects / targets via a virtual build target. In the commands only target again you can setup / modify target variables or envvars accordingly, maybe even using the envvars plugin.

Maybe this is of help.