Tried that. Does the following seem correct to you?

-----------------------------------------------
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 -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.
-----------------------------------------------

Paul


On Sun, Dec 20, 2009 at 8:14 PM, Coda Highland <[email protected]> wrote:
> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 
>>>> 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 <[email protected]> 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 <[email protected]> 
>>>>>> 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 <[email protected]> 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
>>>>>>>> [email protected]
>>>>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Qt-creator mailing list
>>>>>>> [email protected]
>>>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Qt-creator mailing list
>>>>>> [email protected]
>>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>>>
>>>>> _______________________________________________
>>>>> Qt-creator mailing list
>>>>> [email protected]
>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>>
>>>> _______________________________________________
>>>> Qt-creator mailing list
>>>> [email protected]
>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>
>>> _______________________________________________
>>> Qt-creator mailing list
>>> [email protected]
>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>
>> _______________________________________________
>> Qt-creator mailing list
>> [email protected]
>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to