Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: p2rkw on August 25, 2012, 03:37:25 pm

Title: Global compiler settings policy
Post by: p2rkw on August 25, 2012, 03:37:25 pm
Currently compiler and linker settings are fixed to "use projects options only". Why other policies are not available?
Title: Re: Global compiler settings policy
Post by: oBFusCATed on August 25, 2012, 03:48:06 pm
Probably because the global compiler options are always used, no matter of the policy.
This is the reason that putting something project specific there is not a good idea.
Title: Re: Global compiler settings policy
Post by: p2rkw on August 25, 2012, 05:08:55 pm
Ok, so other question: what does "Set as default" option? Every project can choose other compiler, and it ignore default compiler.
For example: I want to compile "Release" version of codeblocks. So I have to add full optimization options to  "GNU GCC Compier", because codeblocks projects use this compiler. After that I build my project in debug version, so I have to revert compiler settings to defaults.
In my opinion projects should be able to use currently set default compiler.
Title: Re: Global compiler settings policy
Post by: oBFusCATed on August 25, 2012, 07:30:19 pm
Hm,
I don't understand the question much.
"Set as default" just makes this compiler the default compiler for new project/targets.

For the C::B's project you can add/remove the optimization options from the project options, which will probably be inherited by all targets.
Also you can use different compiler for different targets.

BTW: we have user manual, probably it is a good idea to take a look at it.
Title: Re: Global compiler settings policy
Post by: p2rkw on August 25, 2012, 09:05:15 pm
So, I have to add these options to more than 30 contrib plugins projects manually? I will create new profile to do this.
Title: Re: Global compiler settings policy
Post by: oBFusCATed on August 25, 2012, 09:22:08 pm
Yes, but you were talking about the codeblocks project, not the contrib workspace.

BTW what exactly do you want to achieve? As far as I know the contrib projects already include optimization options
and if you want to debug a single plugin you can disable the optimizations for this plugin only.