Building with CMake?

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

Building with CMake?

Boost - Users mailing list
I see that individual repositories like boostorg/filesystem on Github
have a CMakeLists.txt. But the boostorg/boost super repo doesn't have
a root CMakeLists.txt. Either this doesn't follow standard CMake
structure or there's no way to build with CMake globally instead of
bjam. How can I build the boost libraries with CMake?
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building with CMake?

Boost - Users mailing list
On Tue, 8 Oct 2019 at 16:30, Robert Dailey via Boost-users
<[hidden email]> wrote:
>
> I see that individual repositories like boostorg/filesystem on Github
> have a CMakeLists.txt. But the boostorg/boost super repo doesn't have
> a root CMakeLists.txt. Either this doesn't follow standard CMake
> structure or there's no way to build with CMake globally instead of
> bjam.

It is the latter.

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: Building with CMake?

Boost - Users mailing list
On Tue, Oct 8, 2019 at 10:06 AM Mateusz Loskot via Boost-users
<[hidden email]> wrote:

>
> On Tue, 8 Oct 2019 at 16:30, Robert Dailey via Boost-users
> <[hidden email]> wrote:
> >
> > I see that individual repositories like boostorg/filesystem on Github
> > have a CMakeLists.txt. But the boostorg/boost super repo doesn't have
> > a root CMakeLists.txt. Either this doesn't follow standard CMake
> > structure or there's no way to build with CMake globally instead of
> > bjam.
>
> It is the latter.

Why, then, do the individual libs have CMake support? What's the point
if you can't build the complete boost library with it?
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building with CMake?

Boost - Users mailing list
On Tue, 8 Oct 2019 at 17:52, Robert Dailey <[hidden email]> wrote:

>
> On Tue, Oct 8, 2019 at 10:06 AM Mateusz Loskot via Boost-users
> <[hidden email]> wrote:
> >
> > On Tue, 8 Oct 2019 at 16:30, Robert Dailey via Boost-users
> > <[hidden email]> wrote:
> > >
> > > I see that individual repositories like boostorg/filesystem on Github
> > > have a CMakeLists.txt. But the boostorg/boost super repo doesn't have
> > > a root CMakeLists.txt. Either this doesn't follow standard CMake
> > > structure or there's no way to build with CMake globally instead of
> > > bjam.
> >
> > It is the latter.
>
> Why, then, do the individual libs have CMake support? What's the point
> if you can't build the complete boost library with it?

Boost is a collection of C++ libraries where each library has a fair bit of
freedom of how it is being developed; each has their developers and
maintainers who are free to add any build configuration they like as
local/internal per the library they maintain.

For example, Boost.Beast and Boost.GIL, both header-only libraries,
allow their contributors to build tests and examples using CMake.
So, CMake-lovers should follow instructions specific to those libraries:
https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md
https://github.com/boostorg/beast#building-tests-and-examples

If you search carefully, you may even find .sln and .vcxproj files
dangling in folders of some libraries. It does not mean you can build
whole Boost by opening the .sln file in VS and hitting Ctrl+Shift+B.

If there is a maintainer of a Boost library who likes Bazel or Premake,
you may see configuration files for those as well.

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: Building with CMake?

Boost - Users mailing list
On Tue, Oct 8, 2019 at 11:29 AM Mateusz Loskot via Boost-users
<[hidden email]> wrote:

> Boost is a collection of C++ libraries where each library has a fair bit of
> freedom of how it is being developed; each has their developers and
> maintainers who are free to add any build configuration they like as
> local/internal per the library they maintain.
>
> For example, Boost.Beast and Boost.GIL, both header-only libraries,
> allow their contributors to build tests and examples using CMake.
> So, CMake-lovers should follow instructions specific to those libraries:
> https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md
> https://github.com/boostorg/beast#building-tests-and-examples
>
> If you search carefully, you may even find .sln and .vcxproj files
> dangling in folders of some libraries. It does not mean you can build
> whole Boost by opening the .sln file in VS and hitting Ctrl+Shift+B.
>
> If there is a maintainer of a Boost library who likes Bazel or Premake,
> you may see configuration files for those as well.

Thanks for explaining. I figured it would be a little more complicated
than that because:

1. This essentially means library maintainers are choosing to maintain
at least 2 build systems (bjam for overall boost build, + whatever
preferential build system they use for the library itself).

2. Dependency management. Boost.Filesystem depends on Boost.System.
But what if Boost.System maintainers didn't want to use CMake?

I don't know how you guys are solving these problems. To me it is much
simpler to use CMake for everything. Not sure why the super repo
hasn't adopted it yet. I recall a project to do CMake for boost that
started years ago.
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Building with CMake?

Boost - Users mailing list
On Tue, 8 Oct 2019 at 18:34, Robert Dailey <[hidden email]> wrote:

> On Tue, Oct 8, 2019 at 11:29 AM Mateusz Loskot via Boost-users <[hidden email]> wrote:
> > Boost is a collection of C++ libraries where each library has a fair bit of
> > freedom of how it is being developed; each has their developers and
> > maintainers who are free to add any build configuration they like as
> > local/internal per the library they maintain.
> >
> > For example, Boost.Beast and Boost.GIL, both header-only libraries,
> > allow their contributors to build tests and examples using CMake.
> > So, CMake-lovers should follow instructions specific to those libraries:
> > https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md
> > https://github.com/boostorg/beast#building-tests-and-examples
> >
> > If you search carefully, you may even find .sln and .vcxproj files
> > dangling in folders of some libraries. It does not mean you can build
> > whole Boost by opening the .sln file in VS and hitting Ctrl+Shift+B.
> >
> > If there is a maintainer of a Boost library who likes Bazel or Premake,
> > you may see configuration files for those as well.
>
> Thanks for explaining. I figured it would be a little more complicated
> than that because:
>
> 1. This essentially means library maintainers are choosing to maintain
> at least 2 build systems (bjam for overall boost build, + whatever
> preferential build system they use for the library itself).

It is not as difficult or time consuming as one may think.

> 2. Dependency management. Boost.Filesystem depends on Boost.System.
> But what if Boost.System maintainers didn't want to use CMake?

No need to.
If maintainer of Boost.Filesystem wants to offer CMake config for
contributors to his library (I emphasise the word "contributors"),
then it is documented that in order to run CMake,
build whole Boost or Filesystem's deps

b2 --with-system ...

That precisely is what GIL does
https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md#using-cmake

> To me it is much simpler to use CMake for everything. Not sure why the super
> repo hasn't adopted it yet.

That is your opinion.
You are free to pitch for CMake but this is not the right place.
This one is https://lists.boost.org/boost/

> I recall a project to do CMake for boost that  started years ago.

There were at least three such initiatives, if I remember correctly.

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: Building with CMake?

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


> -----Original Message-----
> From: Boost-users <[hidden email]> On Behalf Of Robert
> Dailey via Boost-users
> Sent: 8 October 2019 17:34
> To: Boost <[hidden email]>
> Cc: Robert Dailey <[hidden email]>
> Subject: Re: [Boost-users] Building with CMake?
>
> On Tue, Oct 8, 2019 at 11:29 AM Mateusz Loskot via Boost-users <boost-
> [hidden email]> wrote:
> > Boost is a collection of C++ libraries where each library has a fair
> > bit of freedom of how it is being developed; each has their developers
> > and maintainers who are free to add any build configuration they like
> > as local/internal per the library they maintain.
> >
> > For example, Boost.Beast and Boost.GIL, both header-only libraries,
> > allow their contributors to build tests and examples using CMake.
> > So, CMake-lovers should follow instructions specific to those libraries:
> > https://github.com/boostorg/gil/blob/develop/CONTRIBUTING.md
> > https://github.com/boostorg/beast#building-tests-and-examples
> >
> > If you search carefully, you may even find .sln and .vcxproj files
> > dangling in folders of some libraries. It does not mean you can build
> > whole Boost by opening the .sln file in VS and hitting Ctrl+Shift+B.
> >
> > If there is a maintainer of a Boost library who likes Bazel or
> > Premake, you may see configuration files for those as well.
>
> Thanks for explaining. I figured it would be a little more complicated than that
> because:
>
> 1. This essentially means library maintainers are choosing to maintain at least 2
> build systems (bjam for overall boost build, + whatever preferential build system
> they use for the library itself).
>
> 2. Dependency management. Boost.Filesystem depends on Boost.System.
> But what if Boost.System maintainers didn't want to use CMake?
>
> I don't know how you guys are solving these problems. To me it is much simpler to
> use CMake for everything. Not sure why the super repo hasn't adopted it yet. I
> recall a project to do CMake for boost that started years ago.

Indeed - and it is still a work in progress, but it is *much* more difficult that it might appear, and requires time and special skills in both CMake, bjam and each and every  individual Boost libraries.

If you have something to contribute, you are most welcome to help 😉

Paul


Paul A. Bristow
Prizet Farmhouse
Kendal, Cumbria
LA8 8AB           UK



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

Re: Building with CMake?

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
Le 08/10/2019 à 18:52, Mateusz Loskot via Boost-users a écrit :
>> 1. This essentially means library maintainers are choosing to maintain
>> at least 2 build systems (bjam for overall boost build, + whatever
>> preferential build system they use for the library itself).
>
> It is not as difficult or time consuming as one may think.

No offense but who on earth except Boost really use bjam by choice?

I also second the idea of having a unique top level CMake (plus
individual CMake for each library) build system to build all libraries.
Especially since CMake is much superior to bjam regarding portability
and options. For now each time I need to configure Boost for a custom
build I need to spend a lot of time in the Boost Build documentation
which isn't easy IMHO.

Regards,

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

Re: Building with CMake?

Boost - Users mailing list


> -----Original Message-----
> From: Boost-users <[hidden email]> On Behalf Of David
> Demelier via Boost-users
> Sent: 10 October 2019 13:46
> To: [hidden email]
> Cc: David Demelier <[hidden email]>
> Subject: Re: [Boost-users] Building with CMake?
>
> Le 08/10/2019 à 18:52, Mateusz Loskot via Boost-users a écrit :
> >> 1. This essentially means library maintainers are choosing to
> >> maintain at least 2 build systems (bjam for overall boost build, +
> >> whatever preferential build system they use for the library itself).
> >
> > It is not as difficult or time consuming as one may think.
>
> No offense but who on earth except Boost really use bjam by choice?
>
> I also second the idea of having a unique top level CMake (plus individual CMake
> for each library) build system to build all libraries.
> Especially since CMake is much superior to bjam regarding portability and options.
> For now each time I need to configure Boost for a custom build I need to spend a
> lot of time in the Boost Build documentation which isn't easy IMHO.

You are right - bjam remains very difficult (but many users believe that it is also more powerful than CMake).

But it is also not easy as you suggest to replicate the bjam settings using CMake -an expert has been working on Boost.Multiprecision for some months now, and that is much easier than Boost.Math for example.

When all the individual libraries have their CMake working, then it is perhaps the time to tackle the top-level?

If you want to get Boost entirely CMake, you need to 'put your money where your mouth is', and contribute.

Paul

Paul A. Bristow
Prizet Farmhouse
Kendal, Cumbria
LA8 8AB           UK




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

Re: Building with CMake?

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On Thu, 10 Oct 2019 at 14:46, David Demelier via Boost-users
<[hidden email]> wrote:
> Le 08/10/2019 à 18:52, Mateusz Loskot via Boost-users a écrit :
> >> 1. This essentially means library maintainers are choosing to maintain
> >> at least 2 build systems (bjam for overall boost build, + whatever
> >> preferential build system they use for the library itself).
> >
> > It is not as difficult or time consuming as one may think.
>
> No offense but who on earth except Boost really use bjam by choice?

None taken.

> I also second the idea of having a unique top level CMake (plus
> individual CMake for each library) build system to build all libraries.
> Especially since CMake is much superior to bjam regarding portability
> and options.

We all have right to our own opinions.

I just addressed some very concrete questions related to existence of
CMakeLists.txt files for some of Boost libraries.

Please, excuse me the lack of answers to your questions, but I am not
going to allow myself to get dragged into yet another never-ending
nowhere-leading inconclusive thread of Boost.Build vs CMake wrestling .
There have been many, for some too many, of those over the last few years.

Still nobody has come up with a solid working solution acceptable by all
parties involved in using and developing Boost. Indicative, isn't it (rhetoric).

Disclaimer: I'm a CMake daily user and sporadic contributor to CMake myself,
with a decade long experience configuring numerous non-trivial open source
projects for CMake 2.8, then modernizing to CMake 3, 3.5 and later,
who have learned that "CMake is much superior to Boost.Build"
generalizations deserve to be flushed with power of toilet water.

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: Building with CMake?

Boost - Users mailing list
Hello to all,

as someone who implemented boost as a dependency into a CMake Project I
would suggest a simple solution based on this. Just one CMake File that
builds with bjam as a subproject and manages to redirect all compiler
related settings. I can provide my sample implementation if there is
interest in it.

Regards,
Simon

Am 10.10.19 um 16:32 schrieb Mateusz Loskot via Boost-users:

> On Thu, 10 Oct 2019 at 14:46, David Demelier via Boost-users
> <[hidden email]> wrote:
>> Le 08/10/2019 à 18:52, Mateusz Loskot via Boost-users a écrit :
>>>> 1. This essentially means library maintainers are choosing to maintain
>>>> at least 2 build systems (bjam for overall boost build, + whatever
>>>> preferential build system they use for the library itself).
>>>
>>> It is not as difficult or time consuming as one may think.
>>
>> No offense but who on earth except Boost really use bjam by choice?
>
> None taken.
>
>> I also second the idea of having a unique top level CMake (plus
>> individual CMake for each library) build system to build all libraries.
>> Especially since CMake is much superior to bjam regarding portability
>> and options.
>
> We all have right to our own opinions.
>
> I just addressed some very concrete questions related to existence of
> CMakeLists.txt files for some of Boost libraries.
>
> Please, excuse me the lack of answers to your questions, but I am not
> going to allow myself to get dragged into yet another never-ending
> nowhere-leading inconclusive thread of Boost.Build vs CMake wrestling .
> There have been many, for some too many, of those over the last few years.
>
> Still nobody has come up with a solid working solution acceptable by all
> parties involved in using and developing Boost. Indicative, isn't it (rhetoric).
>
> Disclaimer: I'm a CMake daily user and sporadic contributor to CMake myself,
> with a decade long experience configuring numerous non-trivial open source
> projects for CMake 2.8, then modernizing to CMake 3, 3.5 and later,
> who have learned that "CMake is much superior to Boost.Build"
> generalizations deserve to be flushed with power of toilet water.
>
> Best regards,
>

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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Building with CMake?

Boost - Users mailing list
That's good, but not what the OP (or Original Complainant 😉 ) had in mind?

Paul

Paul A. Bristow
Prizet Farmhouse
Kendal, Cumbria
LA8 8AB           UK



> -----Original Message-----
> From: Boost-users <[hidden email]> On Behalf Of Simon
> Michalke via Boost-users
> Sent: 11 October 2019 10:24
> To: [hidden email]
> Cc: Simon Michalke <[hidden email]>
> Subject: Re: [Boost-users] Building with CMake?
>
> Hello to all,
>
> as someone who implemented boost as a dependency into a CMake Project I
> would suggest a simple solution based on this. Just one CMake File that builds with
> bjam as a subproject and manages to redirect all compiler related settings. I can
> provide my sample implementation if there is interest in it.
>
> Regards,
> Simon
>
> Am 10.10.19 um 16:32 schrieb Mateusz Loskot via Boost-users:
> > On Thu, 10 Oct 2019 at 14:46, David Demelier via Boost-users
> > <[hidden email]> wrote:
> >> Le 08/10/2019 à 18:52, Mateusz Loskot via Boost-users a écrit :
> >>>> 1. This essentially means library maintainers are choosing to
> >>>> maintain at least 2 build systems (bjam for overall boost build, +
> >>>> whatever preferential build system they use for the library itself).
> >>>
> >>> It is not as difficult or time consuming as one may think.
> >>
> >> No offense but who on earth except Boost really use bjam by choice?
> >
> > None taken.
> >
> >> I also second the idea of having a unique top level CMake (plus
> >> individual CMake for each library) build system to build all libraries.
> >> Especially since CMake is much superior to bjam regarding portability
> >> and options.
> >
> > We all have right to our own opinions.
> >
> > I just addressed some very concrete questions related to existence of
> > CMakeLists.txt files for some of Boost libraries.
> >
> > Please, excuse me the lack of answers to your questions, but I am not
> > going to allow myself to get dragged into yet another never-ending
> > nowhere-leading inconclusive thread of Boost.Build vs CMake wrestling .
> > There have been many, for some too many, of those over the last few years.
> >
> > Still nobody has come up with a solid working solution acceptable by
> > all parties involved in using and developing Boost. Indicative, isn't it (rhetoric).
> >
> > Disclaimer: I'm a CMake daily user and sporadic contributor to CMake
> > myself, with a decade long experience configuring numerous non-trivial
> > open source projects for CMake 2.8, then modernizing to CMake 3, 3.5
> > and later, who have learned that "CMake is much superior to Boost.Build"
> > generalizations deserve to be flushed with power of toilet water.
> >
> > Best regards,
> >


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

Re: Building with CMake?

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


On Fri, Oct 11, 2019 at 4:29 AM Simon Michalke via Boost-users <[hidden email]> wrote:

as someone who implemented boost as a dependency into a CMake Project I
would suggest a simple solution based on this. Just one CMake File that
builds with bjam as a subproject and manages to redirect all compiler
related settings.

Boost libraries are also available via conan in bintray. 

--
Chris Cleeland

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