在 Qt 项目中不使用 CDBS 将 -O2 添加到 CFLAGS 的 Debian 化方法

发布于 2024-10-05 14:54:12 字数 203 浏览 0 评论 0原文

使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相思碎 2024-10-12 14:54:12

您可以控制 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文