From 6699d46a2a7f12d35926def3e4db3c7a0a5f7449 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Thu, 13 Oct 2016 15:17:53 +0700 Subject: FindBoost: Use string(APPEND) in more cases --- Modules/FindBoost.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 184fb05..84ba061 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -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) -- cgit v0.12 From 2e242b5c1e6b24e4ed59692b9338e295b792f70e Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Thu, 13 Oct 2016 15:17:53 +0700 Subject: FindBoost: Use list(INSERT) to simplify suffix list generation --- Modules/FindBoost.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 84ba061..fc68135 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1390,7 +1390,7 @@ 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 ) endif() -- cgit v0.12 From ca4029fa9aada8e5d86eb81cc5ef9c7e9efe7715 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Thu, 13 Oct 2016 15:17:53 +0700 Subject: FindBoost: Minor style updates --- Modules/FindBoost.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index fc68135..6976038 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1392,7 +1392,7 @@ if( Boost_USE_STATIC_LIBS ) if(WIN32) 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() -- cgit v0.12 From 08b9a0fdfa02f50e6ae2aeca1963e8f47d041dd2 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Thu, 13 Oct 2016 15:17:53 +0700 Subject: FindBoost: Simplify library dir detection with cascading if/elseif/else --- Modules/FindBoost.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 6976038..9bd7a30 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -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}") -- cgit v0.12