用于优化QtCreator编译器的配置 [英] Configuration for optimizing QtCreator compiler
本文介绍了用于优化QtCreator编译器的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Windows 7中使用QtCreator。
I'm using QtCreator in Windows 7.
我要将其配置为使用第三级优化( -O3
)(用于c ++编译器。)
I want to configure it to use third level optimization (-O3
) for c++ compiler.
如何执行此操作以加快代码执行速度以及需要进行哪些更改?
How can I do this to speed up my code and what changes are necessary?
推荐答案
尝试向您的.pro文件添加下一行:
Try to add next lines to your .pro file:
# remove possible other optimization flags
QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
# add the desired -O3 if not present
QMAKE_CXXFLAGS_RELEASE *= -O3
这篇关于用于优化QtCreator编译器的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文