Some time ago I was looking for a solution on SO how to automatically build BOOST library at CMake configure time. I didn't find a complete solution, but I did find useful part about FetchContent. I wrote a CMake script to do this. But this script created a complete library. Then I extended this script to use the "bcp" tool from BOOST to create only the necessary libraries.
So, How to automatically build the necessary BOOST libraries at CMake configure time?
Here is my solution to build and install only the
circular_bufferlibrary (with dependencies) from BOOST:Steps taken:
Here is the full version: https://github.com/weenchvd/cmake-build-boost-lib