MySQL :: MySQL 8.0 Reference Manual :: 2.8.7 MySQL Source-Configuration Options (original) (raw)

mkdir bld  
cd bld  
cmake .. -DDOWNLOAD_BOOST=ON -DWITH_BOOST=$HOME/my_boost  

This causes Boost to be downloaded into themy_boost directory under your home directory. If the required Boost version is already there, no download is done. If the required Boost version changes, the newer version is downloaded.
If Boost is already installed locally and your compiler finds the Boost header files on its own, it may not be necessary to specify the preceding CMake options. However, if the version of Boost required by MySQL changes and the locally installed version has not been upgraded, you may have build problems. Using theCMake options should give you a successful build.
With the above settings that allow Boost download into a specified location, when the required Boost version changes, you need to remove the bld folder, recreate it, and perform the cmake step again. Otherwise, the new Boost version might not get downloaded, and compilation might fail.