Author Topic: can I set optimize option for individual cpp file?  (Read 1656 times)

Offline huzhongshan

  • Multiple posting newcomer
  • *
  • Posts: 109
can I set optimize option for individual cpp file?
« on: April 14, 2011, 05:13:04 pm »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12090
    • Travis build status
Re: can I set optimize option for individual cpp file?
« Reply #1 on: April 14, 2011, 05:21:39 pm »
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!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: can I set optimize option for individual cpp file?
« Reply #2 on: April 14, 2011, 05:21:48 pm »
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ