From f0dac4d01793881b272725ccdecf846d62f4bf09 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 28 Jul 2008 15:40:04 -0400 Subject: BUG: Be more careful with Boost_MINOR_VERSION in FindBoost module --- Modules/FindBoost.cmake | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 79abb10..448707c 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -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} 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() - # In Boost <= 1.35.0, there is no mangled compiler name for - # the Mac OS X/Darwin version of GCC. - SET (_boost_COMPILER "") - ENDIF() + 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(${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(${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() -- cgit v0.12