Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: eranon on May 31, 2012, 09:24:47 am

Title: What's the best way to add a compiler-related target ?
Post by: eranon 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" ?
Title: Re: What's the best way to add a compiler-related target ?
Post by: oBFusCATed 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.
Title: Re: What's the best way to add a compiler-related target ?
Post by: eranon on May 31, 2012, 11:52:31 am
OK, thanks, oBFusCATed.