在 Qt Creator 中,我在哪里将参数传递给编译器? [英] Where in Qt Creator do I pass arguments to a compiler?

查看:48
本文介绍了在 Qt Creator 中,我在哪里将参数传递给编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Qt Creator 中,我在哪里将参数传递给编译器?
这不是那么明显.

Where in Qt Creator do I pass arguments to a compiler?
It isn't really that obvious.

推荐答案

根据您的构建系统,它位于您的 qmake 项目文件(.pro,新项目的标准)或 CMake 文件(CMakeLists.txt,由 KDE 和其他几个项目使用).

Depending on your build system it's either in your qmake project file(.pro, standard for new projects) or in one of the CMake files (CMakeLists.txt, used by KDE and several other projects).

使用 .pro:

QMAKE_CXXFLAGS += -O2

使用 CMake:

set( CMAKE_CXX_FLAGS "-g -Wall")

这篇关于在 Qt Creator 中,我在哪里将参数传递给编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆