Quantcast

Using Boost 1.63 on Windows with FindBoost.cmake

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using Boost 1.63 on Windows with FindBoost.cmake

Boost - Users mailing list

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 mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Boost 1.63 on Windows with FindBoost.cmake

Boost - Users mailing list

  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

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Loading...