The -O1 is just a linker flag. The -O3 -O2 is a problem; try: QMAKE_CXXFLAGS_DEBUG -= -O2 QMAKE_CXXFLAGS_RELEASE -= -O2
On Sun, Dec 20, 2009 at 1:35 PM, Paul Smith <phh...@gmail.com> wrote: > I have just done as you suggested, and getting the following: > > ----------------------------------------------- > Running build steps for project exp... > Configuration unchanged, skipping QMake step. > Starting: /usr/bin/make -w > make: Entering directory `/home/psmith/exp' > g++ -c -pipe -O3 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall > -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB > -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore > -I/usr/include/QtGui -I/usr/include -I. -o exp.o exp.cpp > exp.cpp: In function 'int main()': > exp.cpp:17: warning: unused variable 'ngen' > g++ -Wl,-O1 -o exp exp.o -lQtGui -lQtCore -lpthread > make: Leaving directory `/home/psmith/exp' > Exited with code 0. > ----------------------------------------------- > > Is it now correct? It appears -O1, -O2 and -O3. > > Paul > > > On Sun, Dec 20, 2009 at 6:18 PM, Coda Highland <c...@bobandgeorge.com> wrote: >> That's because I'm an idiot and told you to use the wrong variable. >> Try QMAKE_CXXFLAGS. :P >> >> /s/ Adam >> >> On Sun, Dec 20, 2009 at 11:46 AM, Paul Smith <phh...@gmail.com> wrote: >>> Thanks again, Adam. I did as you suggested, but still getting -O2: >>> >>> ----------------------------------------------- >>> Running build steps for project exp... >>> Configuration unchanged, skipping QMake step. >>> Starting: /usr/bin/make -w >>> make: Entering directory `/home/psmith/exp' >>> g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 >>> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall >>> -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB >>> -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore >>> -I/usr/include/QtGui -I/usr/include -I. -o exp.o exp.cpp >>> exp.cpp: In function 'int main()': >>> exp.cpp:17: warning: unused variable 'ngen' >>> g++ -O3 -Wl,-O1 -o exp exp.o -lQtGui -lQtCore -lpthread >>> make: Leaving directory `/home/psmith/exp' >>> Exited with code 0. >>> ----------------------------------------------- >>> >>> Paul >>> >>> >>> >>> On Sun, Dec 20, 2009 at 2:36 AM, Coda Highland <c...@bobandgeorge.com> >>> wrote: >>>> This is really a qmake question, since it's qmake that controls this. >>>> >>>> In your .pro file, use something like: >>>> QMAKE_LFLAGS -= -O2 >>>> QMAKE_LFLAGS += -O3 >>>> >>>> /s/ Adam >>>> >>>> On Sat, Dec 19, 2009 at 6:38 PM, Paul Smith <phh...@gmail.com> wrote: >>>>> Thanks, Adam. I was thinking about the option -O3. How can one force >>>>> qt-creator to use -O3? >>>>> >>>>> Paul >>>>> >>>>> >>>>> On Sun, Dec 20, 2009 at 12:31 AM, Coda Highland <c...@bobandgeorge.com> >>>>> wrote: >>>>>> On Linux, it uses -O2 by default in release mode if I recall >>>>>> correctly, so it already is. >>>>>> >>>>>> /s/ Adam >>>>>> >>>>>> On Sat, Dec 19, 2009 at 5:46 PM, Paul Smith <phh...@gmail.com> wrote: >>>>>>> Dear All, >>>>>>> >>>>>>> I am new to qt-creator, and I am using it mainly to write my C++ >>>>>>> programs on a Linux machine (Fedora 12). Basically, my projects are >>>>>>> "Empty Qt4" ones. >>>>>>> >>>>>>> My question is: how can one configure qt-creator for optimizing for >>>>>>> speed the C++ programs edited with qt-creator? >>>>>>> >>>>>>> Thanks in advance, >>>>>>> >>>>>>> Paul >>>>>>> _______________________________________________ >>>>>>> Qt-creator mailing list >>>>>>> Qt-creator@trolltech.com >>>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>>>>>> >>>>>> _______________________________________________ >>>>>> Qt-creator mailing list >>>>>> Qt-creator@trolltech.com >>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>>>>> >>>>> _______________________________________________ >>>>> Qt-creator mailing list >>>>> Qt-creator@trolltech.com >>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>>>> >>>> _______________________________________________ >>>> Qt-creator mailing list >>>> Qt-creator@trolltech.com >>>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>>> >>> _______________________________________________ >>> Qt-creator mailing list >>> Qt-creator@trolltech.com >>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>> >> _______________________________________________ >> Qt-creator mailing list >> Qt-creator@trolltech.com >> http://lists.trolltech.com/mailman/listinfo/qt-creator >> > _______________________________________________ > Qt-creator mailing list > Qt-creator@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-creator > _______________________________________________ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator