Qt configure 参数不完全说明 以及 精简系统 减少编译时间的一些方法

最主要的简化手段应该是不编译examples和demos,这两个库里有将近300个程序,编译起来是沉重的负担,另外,调试阶段的话只开debug选项,可以缩短一半以上的编译时间。

 

./configure  –nomake demos –nomake examples -debug  -no-qt3support

另外一种方法是直接修改pro文件:
This is a part of projects.pro in Qt root dir:

#process the projects
for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) {
isEqual(PROJECT, tools) {
!cross_compile:SUBDIRS += tools
else:SUBDIRS += tools/qtestlib
} else:isEqual(PROJECT, examples) {
SUBDIRS += examples
} else:isEqual(PROJECT, demos) {
SUBDIRS += demos
} else:isEqual(PROJECT, libs) {
include(src/src.pro)
} else:isEqual(PROJECT, qmake) {
# SUBDIRS += qmake
} else {
message(Unknown PROJECT: $$PROJECT)
}
}

try to comment "SUBDIRS += examples" and "SUBDIRS += demos" strings before configuring and making ;)

另外还有一种在生成project文件以后的方法(没实验过):

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值