Browse Source

Merge topic 'boost-notfound'

ee300dc25d FindBoost: Suppress imported targets warning if Boost was not found

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2376
Brad King 7 years ago
parent
commit
cff5151822
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/FindBoost.cmake

+ 1 - 1
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)