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" STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2"
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
IF(APPLE) IF(APPLE)
IF (${Boost_MINOR_VERSION} GREATER 35) IF(Boost_MINOR_VERSION)
# In Boost 1.36.0 and newer, the mangled compiler name used IF(${Boost_MINOR_VERSION} GREATER 35)
# on Mac OS X/Darwin is "xgcc". # In Boost 1.36.0 and newer, the mangled compiler name used
SET (_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") # on Mac OS X/Darwin is "xgcc".
ELSE() SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
# In Boost <= 1.35.0, there is no mangled compiler name for ELSE(${Boost_MINOR_VERSION} GREATER 35)
# the Mac OS X/Darwin version of GCC. # In Boost <= 1.35.0, there is no mangled compiler name for
SET (_boost_COMPILER "") # the Mac OS X/Darwin version of GCC.
ENDIF() SET(_boost_COMPILER "")
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() ELSE()
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
ENDIF() ENDIF()