我正在尝试使用 boost 1.56 构建卡萨布兰卡,但由于卡萨布兰卡-Werror
标志的 boost 警告变成错误,我的构建一直失败
例如:
CXX=g++ BOOST_ROOT=${boost} cmake .. -DCMAKE_BUILD_TYPE=Release
产生错误,例如(太多无法显示)
/home/matt/workspace/opal2/o2linux64/Libs/boost/1.56/include/boost/system/error_code.hpp:222:36: error: ‘boost::system::errno_ecat’ defined but not used [-Werror=unused-variable]
static const error_category & errno_ecat = generic_category();
^
/home/matt/workspace/opal2/o2linux64/Libs/boost/1.56/include/boost/system/error_code.hpp:223:36: error: ‘boost::system::native_ecat’ defined but not used [-Werror=unused-variable]
static const error_category & native_ecat = system_category();
^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/cpprest.dir/http/client/http_client_msg.cpp.o] Error 1
我似乎在谷歌上找不到任何补救措施,虽然我发现人们用 1.56 构建的帖子并且没有提到禁用Werror
( src/CMakeList.txt
这似乎允许代码构建)