diff --git a/CMakeLists.txt b/CMakeLists.txt index 41e5dd37fe4f615be2c8f6fc810590d9861de111..5df6911320d889f64982a409e7c7e6734214d393 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -654,13 +654,18 @@ OPTION(OTB_USE_EXTERNAL_BOOST "Use an outside build of Boost." OFF) IF(OTB_USE_EXTERNAL_BOOST) FIND_PACKAGE(Boost) IF(Boost_FOUND) + MESSAGE(STATUS "Found Boost version ${Boost_VERSION}") IF( ${Boost_MINOR_VERSION} EQUAL 40) MESSAGE(WARNING "Boost 1.40 not supported. Disabling OTB_USE_EXTERNAL_BOOST") SET(OTB_USE_EXTERNAL_BOOST OFF) ENDIF(${Boost_MINOR_VERSION} EQUAL 40) + IF( ${Boost_MINOR_VERSION} LESS 35) + MESSAGE(WARNING "Boost >= 1.35 is required. Disabling OTB_USE_EXTERNAL_BOOST") + SET(OTB_USE_EXTERNAL_BOOST OFF) + ENDIF(${Boost_MINOR_VERSION} LESS 35) ELSE(Boost_FOUND) MESSAGE(FATAL_ERROR - "Cannot build OTB project without boost library. Please set Boost directories or set OTB_USE_EXTERNAL_BOOST to OFF to use INTERNAL Boost set on OTB/Utilities repository.") + "Cannot build OTB project without boost library. Please set Boost directories or set OTB_USE_EXTERNAL_BOOST to OFF to use the INTERNAL Boost version") ENDIF(Boost_FOUND) ENDIF(OTB_USE_EXTERNAL_BOOST)