[cmake-developers] Hi and issues with FindBoost

Roger Leigh rleigh at codelibre.net
Mon Feb 4 05:34:21 EST 2019


On 04/02/2019 10:10, Robert Sawko wrote:
> I couldn't find a dedicated bug tracker for cmake modules.

https://gitlab.kitware.com/cmake/cmake/issues/

It's the same bug tracker as for the rest of CMake, since it's all a 
single codebase.  If you put "FindBoost: " as the prefix of the issue 
title, and maybe add me as the assignee, I'll see it that way.

> I am happy to get involved in the maintenance, but would probably need a
> guiding hand.

That's absolutely fine and would certainly be appreciated by me and the 
other people who work on FindBoost.  If you open a merge request, we'll 
be happy to review it and make any suggestions for how it could be 
improved if you're new to working on it (I certainly benefit from and 
appreciate the advice and suggestions of people more experienced than 
myself with CMake details).

> Originally, I've written up my issue on SO originally, but had no
> response:
> 
> https://stackoverflow.com/questions/54205073/boost-root-not-respected-at-link-stage-after-cmake-config

This does seem odd.  It should be using absolute paths to the libraries. 
  Which version of CMake are you using?  I notice the minimum version is 
very old (2.8).  Have you tried a current 3.x release which will have a 
newer version of FindBoost which will also support imported targets like 
"Boost::program_options"?

As an example, this is what I get locally (with cmake 3.12) in 
CMakeCache.txt:

//Boost program_options library (debug)
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG:FILEPATH=/usr/lib/x86_64-linux-gnu/libboost_program_options.so

//Boost program_options library (release)
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libboost_program_options.so

That will result in unambiguous linker options being passed.  You 
/should/ be seeing something similar, which is why I questioned the 
version of CMake you were using.


Kind regards,
Roger


More information about the cmake-developers mailing list