Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

Boost - Users mailing list
I looked in the FindBoost.cmake module and saw that version 1.69.0 is already listed as a known version.  But when I configured CMake to build Jinja2Cpp after building Boost 1.69.0, I couldn't get it to find some modules of Boost.  There were warning messages about imported targets and dependences or some such.  Jinja2Cpp uses an earlier version of Boost from its own submodule in this case (it has a GitHub repository that I cloned from and built), but I'd like it if it used the latest version of Boost instead of an earlier version.  

My Boost installation is in C:/boost_1_69_0/, by the way.  Could this be causing problems, or will it still be fine I configure CMake correctly?  What CMake option should I use to find Boost?  -DBOOST_ROOT?

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

Boost - Users mailing list
On 17.12.2018 12:42, Osman Zakir via Boost-users wrote:
I looked in the FindBoost.cmake module and saw that version 1.69.0 is already listed as a known version.  But when I configured CMake to build Jinja2Cpp after building Boost 1.69.0, I couldn't get it to find some modules of Boost.  There were warning messages about imported targets and dependences or some such.  Jinja2Cpp uses an earlier version of Boost from its own submodule in this case (it has a GitHub repository that I cloned from and built), but I'd like it if it used the latest version of Boost instead of an earlier version.  

My Boost installation is in C:/boost_1_69_0/, by the way.  Could this be causing problems, or will it still be fine I configure CMake correctly?  What CMake option should I use to find Boost?  -DBOOST_ROOT?

I usually set both BOOST_ROOT and BOOST_LIBRARYDIR in the environment. The latter to match the Visual Studio version and the desired code model (win32 vs. win64) as I usually install multiple library binaries.


Cheers,

Leon



_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
Hi,

First, try -DBoost_DEBUG=ON and compare what the module is trying to find,
with what you actually have on disk, with what names and where.

I always use the very latest CMake.

If I can not use the latest (e.g. Visual Studio 2017/2019 integration with
CMake),
then I download the latest FindBoost.cmake, like so
https://github.com/boostorg/gil/blob/develop/CMakeLists.txt#L52-L76

Here, I keep notes on issues I encounter while using the latest
FindBoost.cmake
https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md#using-cmake

Now, assuming you have CMake 3.13+ or latest FindBoost.cmake,
in case you have built Boost with --layout=versioned (default on Windows)

1. Hint CMake about architecture: -DBoost_ARCHITECTURE=-x64

Learn more here
https://gitlab.kitware.com/cmake/cmake/merge_requests/2568#note_479997

2. Hint CMake about compiler:-DBoost_COMPILER=-vc141
(or -DBoost_COMPILER=-gcc5 or any compiler you used)

3. If still failing, -DBoost_DEBUG=ON and analyze the output again, and
again

Regards,
Mateusz Loskot



-----
--
Mateusz Loskot, http://mateusz.loskot.net
--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Users-f2553780.html
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

Boost - Users mailing list
Do you mean I should use the --layout=versioned command when calling b2?  And those other commands when configuring CMake?  I do have the latest version of CMake by the way.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

Boost - Users mailing list
On Mon, 17 Dec 2018 at 22:45, Osman Zakir via Boost-users
<[hidden email]> wrote:
>
> Do you mean I should use the --layout=versioned command when calling b2?

Your choice. On Windows, this is the default.
I personally prefer to use --layout=versioned on both, Windows and Linux.

FindBoost.cmake should work with both, but it may work better/worse
depending on layout and libraries naming.
For example, GCC 5 and clang 4 changed versioning, and it took a while
until FindBoost.cmake
caught up: https://gitlab.kitware.com/cmake/cmake/merge_requests/2579/

>  And those other commands when configuring CMake?

When, on your question about CMake, you are presented with -DXXX=ON,
what else could that be?

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost version 1.69.0 already included in list of known versions in FindBoost.cmake module

Boost - Users mailing list
On Mon, 17 Dec 2018 at 22:57, Mateusz Loskot <[hidden email]> wrote:
>
> On Mon, 17 Dec 2018 at 22:45, Osman Zakir via Boost-users
> <[hidden email]> wrote:
> >
> > Do you mean I should use the --layout=versioned command when calling b2?
>
> Your choice. On Windows, this is the default.
> I personally prefer to use --layout=versioned on both, Windows and Linux.

One more thing, --layout option is explained in the Boost's top-level
Jamfile, i.e. Jamroot

https://github.com/boostorg/boost/blob/master/Jamroot#L61-L85

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users