Sfoglia il codice sorgente

BUG: Eliminates detection of Boost system library prior to 1.35 (see issue #8734)

Philip Lowman 17 anni fa
parent
commit
10da3f74ea
1 ha cambiato i file con 11 aggiunte e 1 eliminazioni
  1. 11 1
      Modules/FindBoost.cmake

+ 11 - 1
Modules/FindBoost.cmake

@@ -299,9 +299,19 @@ endif(Boost_FIND_VERSION_EXACT)
 # Boost.
 # Boost.
 set(Boost_ERROR_REASON)
 set(Boost_ERROR_REASON)
 
 
-
 SET( _boost_IN_CACHE TRUE)
 SET( _boost_IN_CACHE TRUE)
 IF(Boost_INCLUDE_DIR)
 IF(Boost_INCLUDE_DIR)
+
+  # On versions < 1.35, remove the System library from the considered list
+  # since it wasn't added until 1.35.
+  if(Boost_VERSION)
+     math(EXPR _boost_maj "${Boost_VERSION} / 100000")
+     math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
+     if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
+       list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+     endif()
+  endif()
+
   FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
   FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
     STRING(TOUPPER ${COMPONENT} COMPONENT)
     STRING(TOUPPER ${COMPONENT} COMPONENT)
     IF(NOT Boost_${COMPONENT}_FOUND)
     IF(NOT Boost_${COMPONENT}_FOUND)