User forums > General (but related to Code::Blocks)

can I set optimize option for individual cpp file?

(1/1)

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

MortenMacFly:
Project manager -> right click on the file -> properties -> adjust build as needed, using available macros.

Navigation

[0] Message Index

Go to full version