FindBoost: Suppress imported targets warning if Boost was not found

Fixes: #18330
This commit is contained in:
Roger Leigh
2018-09-12 13:23:24 +01:00
parent f53bd80de1
commit ee300dc25d

View File

@@ -573,7 +573,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
endif()
set(_Boost_IMPORTED_TARGETS TRUE)
if(Boost_VERSION VERSION_LESS 103300)
if(Boost_VERSION AND Boost_VERSION VERSION_LESS 103300)
message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
set(_Boost_IMPORTED_TARGETS FALSE)
elseif(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)