summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorDouglas Gregor <doug.gregor@gmail.com>2008-07-28 18:33:40 (GMT)
committerDouglas Gregor <doug.gregor@gmail.com>2008-07-28 18:33:40 (GMT)
commitc2a782a6215b78be718c8100fb7198f903e8c8b3 (patch)
tree90ca8b10fa29eb926c9796b7c6fe98b0bec43ccf /Modules/FindBoost.cmake
parent36b898ccf4979efb328b2ad4f7607f9332a83bf7 (diff)
downloadCMake-c2a782a6215b78be718c8100fb7198f903e8c8b3.zip
CMake-c2a782a6215b78be718c8100fb7198f903e8c8b3.tar.gz
CMake-c2a782a6215b78be718c8100fb7198f903e8c8b3.tar.bz2
BUG: Work around Boost 1.36.0 bug fix on Darwin by setting the mangled compiler name to -xgccVERSION
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake40
1 files changed, 23 insertions, 17 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 905e672..79abb10 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -364,25 +364,31 @@ ELSE (_boost_IN_CACHE)
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
ENDIF(MINGW)
IF (UNIX)
- IF (APPLE)
- # Due to a quirk in Boost.Build, there is no compiler name
- # mangled into library names on Mac OS X/Darwin.
- SET (_boost_COMPILER "")
- ELSE (APPLE)
- IF (NOT CMAKE_COMPILER_IS_GNUCC)
- # We assume that we have the Intel compiler.
- SET (_boost_COMPILER "-il")
- ELSE (NOT CMAKE_COMPILER_IS_GNUCC)
- # Determine which version of GCC we have.
- EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
- ARGS -dumpversion
- OUTPUT_VARIABLE _boost_COMPILER_VERSION
+ IF (NOT CMAKE_COMPILER_IS_GNUCC)
+ # We assume that we have the Intel compiler.
+ SET (_boost_COMPILER "-il")
+ ELSE (NOT CMAKE_COMPILER_IS_GNUCC)
+ # Determine which version of GCC we have.
+ EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
+ ARGS -dumpversion
+ OUTPUT_VARIABLE _boost_COMPILER_VERSION
)
- STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2"
- _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
+ 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()
+ ELSE()
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
- ENDIF (NOT CMAKE_COMPILER_IS_GNUCC)
- ENDIF (APPLE)
+ ENDIF()
+ ENDIF (NOT CMAKE_COMPILER_IS_GNUCC)
ENDIF(UNIX)
SET (_boost_MULTITHREADED "-mt")