Jelajahi Sumber

BUG: fixed bug #7529: FindBoost fails to find boost on SuSE 11.0 due to GCC
reporting version x.y and not x.y.z

Philip Lowman 17 tahun lalu
induk
melakukan
20f2a086d3
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      Modules/FindBoost.cmake

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