BOOST_ROOT environment variable prevents proper Boost version from being found
Recently, the BOOST_ROOT environment variable started being set in Azure Pipelines (https://azure.microsoft.com/en-us/services/devops/pipelines/) hosted VS2017 build agent they provide for CI.
My project uses the following function to find a specific version of Boost: find_package(Boost 1.55 EXACT REQUIRED COMPONENTS random system thread filesystem chrono atomic)
With BOOST_ROOT set, it found a 1.69 version of Boost pre-installed on the system and then failed the find_package attempt saying it was the wrong version.
I'm disappointed that the use of environment variables to influence find_package is now the default. This makes it way too easy for one's system config to change build system behavior and cause the always fun, "It's broken in CI, but works on my machine' problem.
But at the very least, I would expect CMake to keep looking for Boost if the version it finds via BOOST_ROOT isn't matching the exact one I'm looking for.
I'm using CMake 3.13.4.