Skip to content

How to use boost in a cmake project with Conan as package manager

Notifications You must be signed in to change notification settings

spjuanjoc/boost_conan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boost and conan

CI Status
Travis Build Status

Use Boost 1.69 in a CMake project with Conan as package manager.

PropertyTree

Use Conan to include Boost.PropertyTree library into a project, with Boost version 1.69.
Overload the operator ptree() to serialize data to a JSON.
property_tree is a boost header-only library, does not require linkage.
Using gcc-7 and c++17.

Install, compile, and run

Install the third-party libraries using conan, then configure, build, and run:

mkdir "build"
cd build
conan install ../conanfile.txt
cmake -G"Unix Makefiles" -DCMAKE_MODULE_PATH=$PWD ..
cmake --build . 
./boost_conan

Test

Run all the tests:

mkdir "build"
cd build
conan install ../conanfile.txt
cmake -G"Unix Makefiles" -DCMAKE_MODULE_PATH=$PWD -DENABLE_TESTS=True ..
cmake --build . 
ctest .

About

How to use boost in a cmake project with Conan as package manager

Topics

Resources

Stars

Watchers

Forks