Boost logo

Boost Users :

Subject: [Boost-users] Using Boost 1.63 on Windows with FindBoost.cmake
From: csiga.biga_at_[hidden]
Date: 2017-02-22 11:52:04


Does anyone have a working installation of Boost 1.63 on Windows that FindBoost.cmake can be instructed to find?

I tried with both a custom build (for MSMPI mostly) that it failed to find the libraries of, and after reading through FindBoost.cmake, I saw it is dominantly tailored towards the prebuilt binaries (at least on Windows), so I grabbed that, I set BOOSTROOT to the installation root, but it still fails to find Boost::chrono

I got

find_package(Boost 1.63 REQUIRED COMPONENTS chrono)
include_directories(${Boost_INCLUDE_DIRS})

in my top-level CMakeLists.txt file, as all of my targets depend on chrono, and after that I use

target_link_libraries (${declare_trisycl_test_TARGET}
                       $<$<BOOL:USES_OPENCL>:${OpenCL_LIBRARIES}>
                       $<$<NOT:$<BOOL:WIN32>>:Threads::Threads>
                       Boost::chrono)

On the command-line this is what I get at configure time:

CMake Error at C:/Kellekek/Kitware/CMake/3.8.0/share/cmake-3.8/Modules/FindBoost.cmake:1812 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.63.0

  Boost include path: C:/Kellekek/Boost/1.63.0-prebuilt

  Could not find the following Boost libraries:

          boost_chrono

  Some (but not all) of the required Boost libraries were found. You may
  need to install these additional Boost libraries. Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  CMakeLists.txt:26 (find_package)

As far as FindBoost.cmake goes, it seems to know chrono for 1.63. So how should this work?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net