BUG: Be more careful with Boost_MINOR_VERSION in FindBoost module

This commit is contained in:
Douglas Gregor 2008-07-28 15:40:04 -04:00
parent c2a782a621
commit f0dac4d017
1 changed files with 15 additions and 9 deletions

View File

@ -376,15 +376,21 @@ ELSE (_boost_IN_CACHE)
STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2"
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
IF(APPLE)
IF(Boost_MINOR_VERSION)
IF(${Boost_MINOR_VERSION} GREATER 35)
# In Boost 1.36.0 and newer, the mangled compiler name used
# on Mac OS X/Darwin is "xgcc".
SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
ELSE()
ELSE(${Boost_MINOR_VERSION} GREATER 35)
# In Boost <= 1.35.0, there is no mangled compiler name for
# the Mac OS X/Darwin version of GCC.
SET(_boost_COMPILER "")
ENDIF()
ENDIF(${Boost_MINOR_VERSION} GREATER 35)
ELSE(Boost_MINOR_VERSION)
# We don't know the Boost version, so assume it's
# pre-1.36.0.
SET(_boost_COMPILER "")
ENDIF(Boost_MINOR_VERSION)
ELSE()
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
ENDIF()