Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
can I set optimize option for individual cpp file?
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: can I set optimize option for individual cpp file? (Read 3094 times)
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?
Logged
oBFusCATed
Developer
Lives here!
Posts: 13413
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
Logged
(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
Administrator
Lives here!
Posts: 9694
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.
Logged
Compiler logging
: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual
:
https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ
:
https://wiki.codeblocks.org/index.php?title=FAQ
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
can I set optimize option for individual cpp file?