Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2021-07-16 07:53:56


> the only thing i don't understand (after testing/working with serveral
> "variants" of boost cmake integration) is
>
> that not all of the find_package result-Vars are set - but this is the
> first time that every CMake version or Platform returns absolute the
> same results
>
> but Boost_LIBRARY_DIRS is not set anymore - but maybe its just not needed
All of them are not needed at all and not set by the CONFIG files. The
FindBoost module has explicit code to add those for legacy reasons.
In "good" CMake you are supposed to use the targets so all those
variables don't matter for ages now.
> does that mean i've found the holy grail of clean boost cmake
> integration?
Not sure what you mean here.
> are the result correct that way (my co-worker said this "/lib/cmake" at
> the end of CMAKE_PREFIX_PATH seems wrong - but Qt6 is it doing the same
> way - so i think he is wrong)

It is a PREFIX path, so yes, the lib/cmake is wrong.

Besides that: CMakeLists should be independent of your environment.
So setting CMAKE_PREFIX_PATH with hard-coded paths to your local system
is wrong. You are supposed to set the CMAKE_PREFIX_PATH env variable,
e.g. in your bashrc, profile file or manually in the shell or install
boost to a standard path like /usr




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk