[C/C++]cmake无法找到boost库解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/alex_bean/article/details/84135925

最近编译evpp过程中cmake失败,报错如下:
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1138 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost’s headers.
Call Stack (most recent call first):
benchmark/throughput/asio_from_chenshuo/CMakeLists.txt:1 (find_package)

解决办法:
https://stackoverflow.com/questions/21564579/cant-cmake-cpp-netlib-with-boost-framework-made-with-boost-sh-script
例如:

sudo cmake -DBOOST_ROOT=/usr/local/boost -DCMAKE_BUILD_TYPE=Debug ..

猜你喜欢

转载自blog.csdn.net/alex_bean/article/details/84135925