Author Topic: Multiple outputs paths for a build target  (Read 4622 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Multiple outputs paths for a build target
« 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?
(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: 9723
Re: Multiple outputs paths for a build target
« Reply #1 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.
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