CMake更新到3.1.0,Boost更新到1.57,結(jié)果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. 已設(shè)置環(huán)境變量 BOOST_ROOT = C:\Boost
查看 FindBoost.cmake 腳本,發(fā)現(xiàn)它僅搜索已知的版本,而最新版 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 應(yīng)該添加 Boost 未來版本才好。
Powered by: C++博客 Copyright © 金慶