Michael IV
Michael IV

Reputation: 11506

NetBeans IDE gcc compiler optimization options

I am using NetBeans 7.1 with GCC 4.7.I am trying to change the default optimization option which is currently set to be O2 .In the project properties I select "C++ Compiler" ->"Additional Options" and add -O3 .but when compiling I still see in the command line that GCC uses -O2.How do I replace it with -O3, or any other option?

Upvotes: 4

Views: 1894

Answers (1)

dbrank0
dbrank0

Reputation: 9476

First you need to set options for appropriate compiler (c/c++). It looks that (at least Netbeans 7.0.1) adds additional options before optimization switch, so this makes optimization switch override your "additional options" -O switch.

It looks you have to rely on proper "development mode" setting. "Performance release" mode will use -O3 instead of -O2.

Upvotes: 3

Related Questions