Building C++ Boost, and Boosting C++ Builds

  • Published on

  • View

  • Download

Embed Size (px)


<p>Building C++ BoostandBoosting C++ BuildsVladimir Prus, Joom</p> <p>Boost.Build C++ c : Building C++ Boost: Boosting C++ Builds</p> <p>Boost C++ Libraries, 2001</p> <p>Building C++ Boost - Windows/Linux/Mac/Solaris/QNX </p> <p>Req. 1: </p> <p>Building C++ Boost </p> <p>Req. 2: </p> <p>Building C++ Boost </p> <p> 2001</p> <p>Building C++ Boostautomake/autoconfCMakeSCons</p> <p>Boost.Build</p> <p>Boost.BuildV1: 2001: Proof of conceptDave Abrahams, Rene Rivera, Vladimir PrusV2: 2005: Current versionVladimir Prus, Steven Watanabe, Rene ReveraV3: 2017: Python port, IDE support, incremental rebuilds</p> <p>Boost.Buildlib hello : hello.cpp ;</p> <p>$ b2gcc -o bin/gcc/</p> <p>Hello, World</p> <p>Boost.Build</p> <p>Boost.Buildlib hello : hello.cpp ;</p> <p>$ b2 link=staticar bin/gcc/link-static/libhello.a</p> <p>Hello, static World</p> <p>Boost.Build</p> <p>Boost.Buildlib hello : hello.cpp ;</p> <p>$ b2 toolset=msvclink bin/msvc/link-shared/hello.dll</p> <p>Hello, Windows World</p> <p>Boost.Build</p> <p>No reconfigure, or clean, just add a parameter.</p> <p>Boost.Buildlib hello : hello.cpp ;</p> <p>$ b2 toolset=gcc toolset=msvcgcc -o bin/gcc/libhello.solink bin/msvc/hello.dll</p> <p>Hello, both Worlds</p> <p>Boost.Build</p> <p>Boost.Buildlib hello : hello.cpp : space ;</p> <p>$ b2gcc -o bin/gcc/optimization-space/</p> <p>Requirements</p> <p>Boost.Build</p> <p>Boost.Buildif toolset == msvc { lib hello : hello.cpp static ;} else { lib hello : hello.cpp ;}Conditional Requirements 1</p> <p>Boost.Build</p> <p>Boost.Buildlib hello : hello.cpp : msvc:static;</p> <p>rule customize ( properties * ) { if msvc in $(properties) { return static ;}lib hello2 : hello.cpp : @customize ;</p> <p>Conditional Requirements</p> <p>Boost.Build</p> <p>Boost.Buildproject boost : requirements $(BOOST_ROOT) ;</p> <p>lib hello : hello.cpp ;</p> <p>Project Requirements</p> <p>Boost.Build</p> <p>Boost.Buildproject boost : requirements $(BOOST_ROOT) : usage-requirements $(BOOST_ROOT) ;</p> <p>lib hello : hello.cpp ;</p> <p>exe app : app.cpp /boost//hello ;</p> <p>Usage Requirements</p> <p>Boost.Build</p> <p> Boost C++</p> <p>Boost.Buildboost-lib program_options : $(SOURCES).cpp : hpux,gcc: _INCLUDE_STDC__SOURCE_199901 ;</p> <p>Boost.Build</p> <p>Boost.Buildproject : requirements ../build//boost_program_options ; test-suite program_options : [ run parsers_test.cpp ] [ run parsers_test.cpp : shared ] ;</p> <p>Boost.Build</p> <p> PCH</p> <p>Boost.Buildcpp-pch pch : pch.hpp ;run test_gamma_dist.cpp pch ;</p> <p>Boost.Build</p> <p>Boost.Build </p> <p> IDE</p> <p>Boosting C++ Builds</p> <p>Boosting C++ Builds 3 Android, iOS, Windows RT, Embedded ++ </p> <p> : CMake</p> <p>add_library(foo ...)set_property( TARGET foo PROPERTY INTERFACE_INCLUDE_DIRECTORIES "/opt/foo/include")</p> <p>Boosting C++ Builds</p> <p> : QBS</p> <p>Library { cpp.optimization: small Properties { condition: qbs.buildVariant == "debug" cpp.defines: ["QS_LOG_LINE_NUMBERS"] }}</p> <p>Boosting C++ Builds</p> <p> : QBS</p> <p>Library { Export { cpp.includePaths: [product.sourceDirectory] }}</p> <p>Boosting C++ Builds</p> <p>Boost.Build 2016</p> <p> Boost C++ Libraries Python</p> <p></p>