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 未来版本才好。