User forums > Using Code::Blocks

GCC compiler flags -O3 -pedantic

(1/1)

alexchen:
I use Code::Blocks 13.12 on CentOS 7, which has gcc 4.8.2.  I set compiler flags -std=c++11 -m64 -fPIC for the project, and set -O0 and -O3 for Debug and Release targets respectively. However, I notice that command line output in CB's build log window for the compiler always has -O3 and -pedantic flags turned on regardless of whether it is building 'Debug' or 'Release'.
I check at the project file and cannot find such flags defined anywhere.
What can be causing this?

oBFusCATed:
Check you global compiler settings at Settings -> Compiler -> Your compiler
Also check the policy settings for your targets in the Project -> Build options dialog.

alexchen:
Thanks for the information. I have found the problem to be in default.conf in ~/.codeblocks. 

Navigation

[0] Message Index

Go to full version