BUG: Do not check for GCC version encoding in filenames on Boost libraries prior to 1.35. Eliminate "lib" prefix except on MSVC.
This commit is contained in:
parent
811d8acb6b
commit
6d37f93a38
|
@ -469,9 +469,9 @@ ELSE (_boost_IN_CACHE)
|
||||||
|
|
||||||
# Setting some more suffixes for the library
|
# Setting some more suffixes for the library
|
||||||
SET (Boost_LIB_PREFIX "")
|
SET (Boost_LIB_PREFIX "")
|
||||||
IF ( WIN32 AND Boost_USE_STATIC_LIBS )
|
if ( MSVC AND Boost_USE_STATIC_LIBS )
|
||||||
SET (Boost_LIB_PREFIX "lib")
|
SET (Boost_LIB_PREFIX "lib")
|
||||||
ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS )
|
endif()
|
||||||
|
|
||||||
if (Boost_COMPILER)
|
if (Boost_COMPILER)
|
||||||
set(_boost_COMPILER ${Boost_COMPILER})
|
set(_boost_COMPILER ${Boost_COMPILER})
|
||||||
|
@ -481,6 +481,9 @@ ELSE (_boost_IN_CACHE)
|
||||||
endif()
|
endif()
|
||||||
else(Boost_COMPILER)
|
else(Boost_COMPILER)
|
||||||
# Attempt to guess the compiler suffix
|
# Attempt to guess the compiler suffix
|
||||||
|
# NOTE: this is not perfect yet, if you experience any issues
|
||||||
|
# please report them and use the Boost_COMPILER variable
|
||||||
|
# to work around the problems.
|
||||||
if (MSVC90)
|
if (MSVC90)
|
||||||
SET (_boost_COMPILER "-vc90")
|
SET (_boost_COMPILER "-vc90")
|
||||||
elseif (MSVC80)
|
elseif (MSVC80)
|
||||||
|
@ -500,41 +503,49 @@ ELSE (_boost_IN_CACHE)
|
||||||
set (_boost_COMPILER "-il")
|
set (_boost_COMPILER "-il")
|
||||||
endif()
|
endif()
|
||||||
elseif (MINGW)
|
elseif (MINGW)
|
||||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
|
||||||
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
|
||||||
OUTPUT_VARIABLE _boost_COMPILER_VERSION
|
else()
|
||||||
)
|
|
||||||
STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
|
|
||||||
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
|
|
||||||
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
|
|
||||||
elseif (UNIX)
|
|
||||||
if (CMAKE_COMPILER_IS_GNUCC)
|
|
||||||
# Determine which version of GCC we have.
|
|
||||||
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
||||||
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
||||||
OUTPUT_VARIABLE _boost_COMPILER_VERSION
|
OUTPUT_VARIABLE _boost_COMPILER_VERSION
|
||||||
)
|
)
|
||||||
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)
|
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
|
||||||
IF(Boost_MINOR_VERSION)
|
endif()
|
||||||
IF(${Boost_MINOR_VERSION} GREATER 35)
|
elseif (UNIX)
|
||||||
# In Boost 1.36.0 and newer, the mangled compiler name used
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||||||
# on Mac OS X/Darwin is "xgcc".
|
if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
|
||||||
SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
|
SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
|
||||||
ELSE(${Boost_MINOR_VERSION} GREATER 35)
|
else()
|
||||||
# In Boost <= 1.35.0, there is no mangled compiler name for
|
# Determine which version of GCC we have.
|
||||||
# the Mac OS X/Darwin version of GCC.
|
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
|
||||||
|
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
||||||
|
OUTPUT_VARIABLE _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)
|
||||||
|
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 "")
|
SET(_boost_COMPILER "")
|
||||||
ENDIF(${Boost_MINOR_VERSION} GREATER 35)
|
ENDIF(Boost_MINOR_VERSION)
|
||||||
ELSE(Boost_MINOR_VERSION)
|
ELSE()
|
||||||
# We don't know the Boost version, so assume it's
|
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
|
||||||
# pre-1.36.0.
|
ENDIF()
|
||||||
SET(_boost_COMPILER "")
|
endif()
|
||||||
ENDIF(Boost_MINOR_VERSION)
|
|
||||||
ELSE()
|
|
||||||
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
|
|
||||||
ENDIF()
|
|
||||||
endif (CMAKE_COMPILER_IS_GNUCC)
|
endif (CMAKE_COMPILER_IS_GNUCC)
|
||||||
endif()
|
endif()
|
||||||
if(Boost_DEBUG)
|
if(Boost_DEBUG)
|
||||||
|
@ -544,7 +555,6 @@ ELSE (_boost_IN_CACHE)
|
||||||
endif(Boost_COMPILER)
|
endif(Boost_COMPILER)
|
||||||
|
|
||||||
SET (_boost_MULTITHREADED "-mt")
|
SET (_boost_MULTITHREADED "-mt")
|
||||||
|
|
||||||
if( NOT Boost_USE_MULTITHREADED )
|
if( NOT Boost_USE_MULTITHREADED )
|
||||||
set (_boost_MULTITHREADED "")
|
set (_boost_MULTITHREADED "")
|
||||||
endif()
|
endif()
|
||||||
|
@ -564,7 +574,6 @@ ELSE (_boost_IN_CACHE)
|
||||||
ENDIF( Boost_USE_STATIC_LIBS )
|
ENDIF( Boost_USE_STATIC_LIBS )
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
|
SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
|
||||||
|
|
||||||
if(Boost_DEBUG)
|
if(Boost_DEBUG)
|
||||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||||
"_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
|
"_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
|
||||||
|
|
Loading…
Reference in New Issue