简体   繁体   中英

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).
I have downloaded Boost 1.75.0, ran bootstrap.bat then b2.exe from an admin CMD. I then added the path to the boost folder to PATH variable. Next I opened CMake and tried to build HPX 1.3.0 and got the following error:

  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. I would try explicitly setting the BOOST_INCLUDEDIR and BOOST_LIBRARYDIR CMake variables pointing to the corresponding directories. See also https://cmake.org/cmake/help/latest/module/FindBoost.html for more CMake variables you could set.

Note also, that the warnings issued in your logs are benign and caused by your CMake version being older than Boost V1.75.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM