在 Qt 项目中不使用 CDBS 将 -O2 添加到 CFLAGS 的 Debian 化方法
使用 qmake 而不使用 cdbs 在 debianized 源中提供编译器优化级别信息的标准机制是什么?
例如,如果 DEB_BUILD_OPTIONS 未定义 noopt,则 -O2 应进入 CFLAGS。每次我尝试在 debian/rules 中自己指定 CFLAGS 时,它都会被 qmake 系统生成的 Makefile 覆盖。
任何帮助表示赞赏!
What is the standard mechanism to deliver compiler optimization level information in debianized source using qmake without using cdbs?
For example, if DEB_BUILD_OPTIONS doesn't have noopt defined, -O2 should go into CFLAGS. Everytime I try to specify CFLAGS myself in debian/rules, it gets overwritten by Makefile that was generated by qmake system.
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以控制 qmake
.pro
文件吗?如果是,您可以使用 qmake 的$$()
或$()
语法在 Makefile 生成或评估期间使用环境变量的值。另一个(更复杂的)选项可能是设置 QMAKESPEC 环境变量以使 qmake 使用另一个基本配置。
Do you have control over the qmake
.pro
file? If yes, you could use qmake's$$()
or$()
syntax to use the value of the environment variable either during Makefile generation or evaluation.Another (more involved) option might be to set the
QMAKESPEC
environment variable to make qmake use another base configuration.