IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    CMake搜索Boost1.57失败及解决

    金庆发表于 2015-01-20 04:18:00
    love 0

    CMake更新到3.1.0,Boost更新到1.57,结果CMake搜索Boost失败:

    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.

    已设置环境变量 BOOST_ROOT = C:\Boost

    查看 FindBoost.cmake 脚本,发现它仅搜索已知的版本,而最新版 1.57 还未添加:

    set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
    "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54"
    "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
    "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"

    添加 “1.57” 后即成功。

    FindBoost.cmake 应该添加 Boost 未来版本才好。




    金庆 2015-01-20 12:18 发表评论


沪ICP备19023445号-2号
友情链接