diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 21c2fae62..8958eb97e 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -459,7 +459,7 @@ ELSE (_boost_IN_CACHE) ARGS -dumpversion OUTPUT_VARIABLE _boost_COMPILER_VERSION ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") ENDIF(MINGW) @@ -473,7 +473,7 @@ ELSE (_boost_IN_CACHE) ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion OUTPUT_VARIABLE _boost_COMPILER_VERSION ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) IF(APPLE) IF(Boost_MINOR_VERSION)