summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Klein <d.klein@gsi.de>2019-05-14 18:10:22 (GMT)
committerDennis Klein <d.klein@gsi.de>2019-05-15 13:45:14 (GMT)
commite1e3935f5d93687040738943bccdd53b6926f9ae (patch)
tree17d6e758151be995a823ee6e971ac92f2c5f90bb
parent66efdbd21a46b63572f5de677ed126a68e524e7a (diff)
downloadCMake-e1e3935f5d93687040738943bccdd53b6926f9ae.zip
CMake-e1e3935f5d93687040738943bccdd53b6926f9ae.tar.gz
CMake-e1e3935f5d93687040738943bccdd53b6926f9ae.tar.bz2
FindBoost: Remove obsolete diagnostic message about Boost_ROOT
CMake 3.12 introduced <package>_ROOT CMake and environment variables to be valid hints to find_package(<package>). Defining Boost_ROOT is no longer wrong if CMP0074 is set to NEW. Fixes #18810
-rw-r--r--Modules/FindBoost.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 23549cb..018f675 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1265,7 +1265,11 @@ if(WIN32)
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB")
endif()
-_Boost_CHECK_SPELLING(Boost_ROOT)
+cmake_policy(GET CMP0074 _Boost_CMP0074)
+if(NOT "x${_Boost_CMP0074}x" STREQUAL "xNEWx")
+ _Boost_CHECK_SPELLING(Boost_ROOT)
+endif()
+unset(_Boost_CMP0074)
_Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
_Boost_CHECK_SPELLING(Boost_INCLUDEDIR)