您的位置:首页 > 大数据 > 人工智能

消除 Imported targets not available for Boost version 106300警告提示

2016-12-31 00:00 260 查看
摘要: CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:740 (message):
Imported targets not available for Boost version 106300

使用新版本的boost库,运行cmake编译程序时,遇到警告信息: Imported targets not available for Boost version 106300,

这是由于cmake版本旧,boost版本新,cmake带来的FindBoost.cmake,

编辑/usr/share/cmake-3.5/Modules/FindBoost.cmake文件,搜索Imported targets not available for Boost version ${Boost_VERSION}
在这个if语句最后加入,内容可以复制对上个版本的内容或者把版本好加大:

elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106400)
set(_Boost_CHRONO_DEPENDENCIES system)
set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
set(_Boost_COROUTINE_DEPENDENCIES context system)
set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
set(_Boost_FILESYSTEM_DEPENDENCIES system)
set(_Boost_IOSTREAMS_DEPENDENCIES regex)
set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
set(_Boost_MPI_DEPENDENCIES serialization)
set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
set(_Boost_RANDOM_DEPENDENCIES system)
set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
else()
message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}")
set(_Boost_IMPORTED_TARGETS FALSE)
endif()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐