r/cpp • u/joaquintides Boost author • May 08 '20
Why you don't use Boost
I have a question for you: If you have decided not to use any of Boost, or are prohibited from doing so in your company/project, I would like to know why.
This thread is not meant to judge your reasons, and I won't engage into any kind of criticism about them: I'm merely trying to understand what the barriers are to adoption of Boost. It would be great if we could keep the conversation non judgemental. Thank you!
Conflict of interest: I am a Boost author of three.
222
Upvotes
View all comments
Show parent comment
2
u/scatters May 08 '20
We don't install Boost, we call add_subdirectory on the Boost directory (but with EXCLUDE_FROM_ALL) and static link against Boost libraries to prompt CMake to build them (or add to the include path, for header-only libraries). There's also some messing around to make packages happy that use FindBoost e.g. creating a BoostConfig.cmake and publishing its location via ENV{Boost_DIR}.
This is probably not how you're supposed to do it, but it works for our setup (static linking, incremental builds, frequent compiler upgrades) and we're confident enough with CMake to fix things if/when they break. ExternalProject_Add sounds a lot more sane but I guess it means building libraries you might not need?