Merge topic 'FindBoost-minor-cleanup'

08b9a0fd FindBoost: Simplify library dir detection with cascading if/elseif/else
ca4029fa FindBoost: Minor style updates
2e242b5c FindBoost: Use list(INSERT) to simplify suffix list generation
6699d46a FindBoost: Use string(APPEND) in more cases
This commit is contained in:
Brad King
2016-10-14 09:02:48 -04:00
committed by CMake Topic Stage
+11 -13
View File
@@ -1313,13 +1313,13 @@ string(APPEND _boost_DEBUG_ABI_TAG "d")
# p using the STLport standard library rather than the
# default one supplied with your compiler
if(Boost_USE_STLPORT)
set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
string(APPEND _boost_RELEASE_ABI_TAG "p")
string(APPEND _boost_DEBUG_ABI_TAG "p")
endif()
# n using the STLport deprecated "native iostreams" feature
if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
set( _boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
string(APPEND _boost_RELEASE_ABI_TAG "n")
string(APPEND _boost_DEBUG_ABI_TAG "n")
endif()
if(Boost_DEBUG)
@@ -1390,9 +1390,9 @@ endif()
if( Boost_USE_STATIC_LIBS )
set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .lib .a)
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif()
endif()
@@ -1418,7 +1418,7 @@ endif()
set(_boost_STATIC_RUNTIME_WORKAROUND false)
if(WIN32 AND Boost_USE_STATIC_LIBS)
if(NOT DEFINED Boost_USE_STATIC_RUNTIME)
set(_boost_STATIC_RUNTIME_WORKAROUND true)
set(_boost_STATIC_RUNTIME_WORKAROUND TRUE)
endif()
endif()
@@ -1681,13 +1681,11 @@ if(Boost_FOUND)
endif()
if(EXISTS "${_boost_LIB_DIR}/lib")
set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
string(APPEND _boost_LIB_DIR /lib)
elseif(EXISTS "${_boost_LIB_DIR}/stage/lib")
string(APPEND _boost_LIB_DIR "/stage/lib")
else()
if(EXISTS "${_boost_LIB_DIR}/stage/lib")
set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
else()
set(_boost_LIB_DIR "")
endif()
set(_boost_LIB_DIR "")
endif()
if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")