diff --git a/CMakeModules/Boost/BoostConfig.cmake b/CMakeModules/Boost/BoostConfig.cmake index a5e01f2d5..bbd77eb75 100644 --- a/CMakeModules/Boost/BoostConfig.cmake +++ b/CMakeModules/Boost/BoostConfig.cmake @@ -4,6 +4,9 @@ MESSAGE(STATUS "Using custom FindBoost config") find_package(Boost 1.58 REQUIRED COMPONENTS ${Boost_FIND_COMPONENTS}) +IF("${Boost_VERSION}" VERSION_GREATER_EQUAL "1.70") + MESSAGE(FATAL_ERROR "Boost version must be at least 1.58 and at most 1.69 .") +ENDIF() # Inject `pthread` dependency to Boost if needed if (UNIX AND NOT CYGWIN)