Boost logo

Boost :

Subject: Re: [boost] Boost CMake update
From: paul (pfultz2_at_[hidden])
Date: 2017-10-02 15:36:06


On Fri, 2017-09-29 at 21:40 -0700, Robert Ramey via Boost wrote:
> On 9/29/17 9:33 PM, Robert Ramey via Boost wrote:
> >
> > On 9/29/17 10:02 AM, paul via Boost wrote:
> > >
> > > Hi all,
> > >
> > > So I have been working at converting more of boost tests to cmake 
> > > utilizing
> > > the BCM library, here:
> > >
> > > https://github.com/boost-cmake/boost/tree/1.64
> > >
> I'm also not seeing
>
> a) how one just builds the library without running the tests?

Sorry, I kind of assumed cmake knowledge beforehand. To build the library:

cmake --build .

To install:

cmake --build . --target install

Also, you can just build but not run the tests with the `tests` target:

cmake --build . --target tests

And of course, there is a project-specific version of these targets as well:

# Build tests for serialization
cmake --build . --target tests-boost_serialization
# Build and run tests for serialization
cmake --build . --target check-boost_serialization

>
> b) how one builds dynamic/shared library versions

Set `BUILD_SHARED_LIBS` to true, when you run cmake the first time:

cmake -DBUILD_SHARED_LIBS=On ..

>
> c) how one includes all that is required by an IDE.

You set the generator to generate the IDE files:

cmake -G 'CodeBlocks - Unix Makefiles' ..

>
> To see how this last can be done, you can look at my CMakeLists.txt in 
> the serialization library.

I don't follow this at all. I dont see any comments about generating IDE
files.

.


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