Using Boost 1.63 on Windows with FindBoost.cmake
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}>
$<$
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?
FindBoost.cmake works for me with 1.63. but I'm not using the "Boost::<library>" syntax, I'm just using the ${Boost_LIBRARIES} variable, which brings in the libs you specify in find_package, but not the relevant dependencies (I think), so it's slightly more manual because you need to manually ass boost_system,etc. target_link_libraries (${declare_trisycl_test_TARGET} ${Boost_LIBRARIES}) The other mistake I make from time to time is 32bit vs 64bit libraries -- in this case I get the exact error you are getting because it finds the headers but not libs of the correct architecture. Hope this helps. -- chris
participants (2)
-
Chris Glover
-
csiga.biga@aol.com