summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@codelibre.net>2018-09-12 12:23:24 (GMT)
committerRoger Leigh <rleigh@codelibre.net>2018-09-12 13:44:57 (GMT)
commitee300dc25ddb1968d266c70cad2d382702e43b25 (patch)
tree933d8d8d058cd74ae52e98a202e08dfdc4848ef3
parentf53bd80de17546351a635a47434b2ac66b4100a7 (diff)
downloadCMake-ee300dc25ddb1968d266c70cad2d382702e43b25.zip
CMake-ee300dc25ddb1968d266c70cad2d382702e43b25.tar.gz
CMake-ee300dc25ddb1968d266c70cad2d382702e43b25.tar.bz2
FindBoost: Suppress imported targets warning if Boost was not found
Fixes: #18330
-rw-r--r--Modules/FindBoost.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 24ee1f2..37539ba 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -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)