News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

can I set optimize option for individual cpp file?

Started by huzhongshan, April 14, 2011, 05:13:04 PM

Previous topic - Next topic

huzhongshan

I use tdm4.5.2 gcc , and find that its optimization (esp. with -O3 ) will bring some error for one cpp file in my project. I want to use -O2 only for this cpp file , and other files still -O3 , how can I do this?

oBFusCATed

select the file -> right click -> properties -> advanced -> then you modify the command executed
(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!]

MortenMacFly

Project manager -> right click on the file -> properties -> adjust build as needed, using available macros.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]