FindBoost: Fails with 'Boost_ROOT is not the correct spelling' even when set CMP0074 NEW in cmake 3.12
From CMake 3.12, find_package() accept (package)_ROOT
variable for hint.
Policy CMP0074
is introduced to set behavior.
When call cmake_policy(set CMP0074 NEW)
then find_package(Boost)
with cmake -DBoost_ROOT=/path/to/boost
, it fails with
2019-01-16T11:07:24.3059837Z CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/FindBoost.cmake:445 (message):
2019-01-16T11:07:24.3060688Z ERROR: Boost_ROOT is not the correct spelling. The proper spelling is
2019-01-16T11:07:24.3061166Z BOOST_ROOT.
Document of find_package()
said (package)_ROOT
variable is introduced. Document of FindBoost
say nothing about Boost_ROOT
variable and its behavior.
https://cmake.org/cmake/help/v3.12/command/find_package.html https://cmake.org/cmake/help/v3.12/module/FindBoost.html