diff options
-rw-r--r-- | Modules/FindBoost.cmake | 24 |
1 files 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() |