我正在使用qmake/make来构建一个库。目前,构建正在工作,但我们不能使用结果库。
qmake生成这个Makefile:
CFLAGS = -Wall -pedantic -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -O2 $(DEFINES)
CXXFLAGS = -Wall -pedantic -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -O2 $(DEFINES)
当修改Makefile并使用这些选项时,它工作如下:
CFLAGS = -Wall -pedantic -fPIC
CXXFLAGS = -Wall -pedantic -fPIC
我的.pro文件包含以下信息:
TEMPLATE = lib subdirs
CONFIG = create_prl staticlib
QMAKE_CXXFLAGS = -Wall -pedantic -fPIC
QMAKE_CFLAGS = -Wall -pedantic -fPIC
# and Sources + headers
问题是如何让qmake只生成所需的标志?(即-Wall -pedantic -fPIC
)
发布于 2016-04-18 09:35:18
我成功地使用这些命令删除了所有标志:
QMAKE_CXXFLAGS_RELEASE = -Wall -pedantic -fPIC
QMAKE_CFLAGS_RELEASE = -Wall -pedantic -fPIC
https://stackoverflow.com/questions/36650216
复制相似问题