• 5602阅读
  • 1回复

请教一个关于Makefile的问题 [复制链接]

上一主题 下一主题
离线apn172
 

只看楼主 倒序阅读 楼主  发表于: 2012-01-18
下载了qt-everywhere-opensource-src.4.8.0
编译过程中出现了如下错误
cc1plus: warnings being treated as errors
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h: In instantiation of ‘WTF::PassOwnPtr<JSC::Yarr::ByteDisjunction>’:
../../../Source/JavaScriptCore/yarr/YarrInterpreter.h:341: instantiated from here
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h:73: warning: lowering visibility of ‘WTF::PassOwnPtr<U> WTF::adoptPtr(U*) [with U = U, T = JSC::Yarr::ByteDisjunction]’ to match its type
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h: In instantiation of ‘WTF::PassOwnPtr<JSC::Yarr::BytecodePattern>’:
../../../Source/JavaScriptCore/yarr/YarrInterpreter.cpp:1520: instantiated from here
../../../Source/JavaScriptCore/wtf/PassOwnPtr.h:73: warning: lowering visibility of ‘WTF::PassOwnPtr<U> WTF::adoptPtr(U*) [with U = U, T = JSC::Yarr::BytecodePattern]’ to match its type
make[1]: *** [obj/release/YarrInterpreter.o] Error 1
make[1]: Leaving directory `/opt/wubin/WebKit/WebKitBuild/Release/JavaScriptCore'
make: *** [sub-JavaScriptCore-JavaScriptCore-pro-make_default-ordered] Error 2

我知道造成编译中断的原因是因为编译时设置了-werror选项,Makefile中的CXXFLAGS也确实有这个选项.
直接删除makefile中的该选项肯定是可以的,但是有很多工程中的makefile都有该选项,如果手动删除的话效率很低.

我也知道Makefile是通过运行configure脚本由qmake按照.pro文件的配置生成的.
现在问题就是我想在自动生成makefile文件的时候就不包含-Werror选项,我想知道的是更改哪里的配置可以达到这个目的?
离线XChinux

只看该作者 1楼 发表于: 2012-01-18
QMAKE_CXXFLAGS -= -Werror
这样可以吗?我没有试验过。
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
快速回复
限100 字节
 
上一个 下一个