1.What NO_MODULE does:
- It tells CMake to look for a FindBoost.cmake file instead of a
BoostConfig.cmake file.
- It forces CMake to use the FindBoost module from the CMake package
repository, which is the modern and recommended way to find Boost
libraries.
2.Drawbacks of using NO_MODULE:
- If you're using an older version of Boost that doesn't provide a
BoostConfig.cmake file, specifying NO_MODULE might cause
find_package(Boost REQUIRED NO_MODULE) to fail because it won't find
any Boost configuration.
- If you have a specific version of Boost installed on your system that
you want to use, and it only provides a BoostConfig.cmake file, then
using NO_MODULE would prevent you from finding that version.
- If your project relies on specific features or configurations
provided by the BoostConfig.cmake file, using NO_MODULE might cause
those features to be unavailable.
If you're not experiencing any issues after adding NO_MODULE, it's likely that your Boost installation is compatible with the FindBoost.cmake file from the CMake package repository. It's generally recommended to use NO_MODULE and the modern FindBoost.cmake approach because it's the direction in which CMake is heading, and it will ensure better compatibility with future versions of CMake.
However, if you do encounter issues, you might need to either update your Boost installation to a version that's compatible with the new FindBoost module or remove the NO_MODULE option and ensure that a BoostConfig.cmake file is available for CMake to use.