Author Topic: What's the best way to add a compiler-related target ?  (Read 3830 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
What's the best way to add a compiler-related target ?
« on: May 31, 2012, 09:24:47 am »
Hello,

I would like to be able to build a same project against two different compilers ; GCC and MSVC9, both up, running and already binded with C::B using global "Settings/Compilers". So, knowing the project is already defined to use GCC through targets I called "GCC Debug" and "GCC Release", what's the right way to add equivalent (but with its specific options) targets for MSVC (ie. MSVC Debug" and "MSVC Release".

Should I add them from "Project properties / Build targets tab" or using "File / New / Build target" ? Also, does the compiler and linker options will be automatically tuned on predictable defaults values as done by the "Project wizard" ? Or, if not, is it possible to quickly copy all the compiler and linker options from a project to another one (I mean without to manually go in every field) ? Or, last hypothsis, should I define my default for every compiler in global "Settings/Compilers" ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: What's the best way to add a compiler-related target ?
« Reply #1 on: May 31, 2012, 09:37:04 am »
Should I add them from "Project properties / Build targets tab" or using "File / New / Build target" ?
I'd use the first method, but I guess there is no difference.

Also, does the compiler and linker options will be automatically tuned on predictable defaults values as done by the "Project wizard" ? Or, if not, is it possible to quickly copy all the compiler and linker options from a project to another one (I mean without to manually go in every field) ? Or, last hypothsis, should I define my default for every compiler in global "Settings/Compilers" ?
Linker libraries should be copied, all other options will be put in the compiler -> other options and linker->other options.
There is no code which converts the options from compiler A to options for compiler B, but it is not such a problem.
(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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: What's the best way to add a compiler-related target ?
« Reply #2 on: May 31, 2012, 11:52:31 am »
OK, thanks, oBFusCATed.
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]