[英]Can't build HPX with CMake on Windows - found [Boost] suitable version “1.75.0”, minimum required is “1.61”
I'm trying to build HPX with CMake on Windows 10 (the end game is to build OpenCV with MSVC).我正在尝试在 Windows 10 上使用 CMake 构建 HPX(最终游戏是使用 MSVC 构建 OpenCV)。
I have downloaded Boost 1.75.0, ran bootstrap.bat
then b2.exe
from an admin CMD.我已经从管理员 CMD 下载了 Boost 1.75.0,然后运行bootstrap.bat
然后b2.exe
。 I then added the path to the boost folder to PATH variable.然后我将 boost 文件夹的路径添加到 PATH 变量中。 Next I opened CMake and tried to build HPX 1.3.0 and got the following error:接下来我打开 CMake 并尝试构建 HPX 1.3.0 并得到以下错误:
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Boost (missing: filesystem program_options system) (found
suitable version "1.75.0", minimum required is "1.61")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:2193 (find_package_handle_standard_args)
cmake/HPX_SetupBoost.cmake:75 (find_package)
CMakeLists.txt:1576 (include)
Please help!请帮忙!
Looks like CMake found the Boost header files but not the Boost binaries.看起来 CMake 找到了 Boost header 文件,但没有找到 Boost 二进制文件。 I would try explicitly setting the BOOST_INCLUDEDIR
and BOOST_LIBRARYDIR
CMake variables pointing to the corresponding directories.我会尝试明确设置指向相应目录的BOOST_INCLUDEDIR
和BOOST_LIBRARYDIR
CMake 变量。 See also https://cmake.org/cmake/help/latest/module/FindBoost.html for more CMake variables you could set.有关可以设置的更多 CMake 变量,另请参见https://cmake.org/cmake/help/latest/module/FindBoost.html 。
Note also, that the warnings issued in your logs are benign and caused by your CMake version being older than Boost V1.75.另请注意,您的日志中发出的警告是良性的,并且是由您的 CMake 版本早于 Boost V1.75 引起的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.