Replace FindBoost_add_-lpthread_#563479.diff patch with a better version.

Steal a new patch from upstream BTS. What is more, make some minor changes to
it to make it apply and work with current FindBoost.
ci/unstable
Modestas Vainius 12 years ago
parent 5ed48a7cba
commit 73b3dfd44f

2
debian/changelog vendored

@ -6,6 +6,8 @@ cmake (2.8.11~rc1-1) UNRELEASED; urgency=low
* Drop XMLrpc support. It has been disabled upstream for a while now. * Drop XMLrpc support. It has been disabled upstream for a while now.
(Closes: #687326) (Closes: #687326)
* Bump Standards-Version to 3.9.4: no changes needed. * Bump Standards-Version to 3.9.4: no changes needed.
* Replace FindBoost_add_-lpthread_#563479.diff patch with a better version
from upstream BTS and make it apply to current FindBoost.
-- Modestas Vainius <modax@debian.org> Fri, 05 Oct 2012 21:00:55 +0300 -- Modestas Vainius <modax@debian.org> Fri, 05 Oct 2012 21:00:55 +0300

@ -1,23 +1,44 @@
Subject: Add -lpthread when using Boost::Thread. Subject: Add -lpthread when using Boost::Thread.
Author: Kai Wasserbäch <debian@carbon-project.org> Author: Philip Lowman <debian@carbon-project.org>
Origin: vendor Author: Modestas Vainius <modax@debian.org>
Last-Update: 2011-01-16 Origin: other, http://public.kitware.com/Bug/file_download.php?file_id=3929&type=bug
Last-Update: 2013-03-16
Bug: http://cmake.org/Bug/view.php?id=10692 Bug: http://cmake.org/Bug/view.php?id=10692
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563479 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563479
Forwarded: http://cmake.org/Bug/file_download.php?file_id=3629&type=bug Forwarded: http://cmake.org/Bug/file_download.php?file_id=3629&type=bug
---
Modules/FindBoost.cmake | 3 +++
1 file changed, 3 insertions(+)
--- a/Modules/FindBoost.cmake --- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake
@@ -1184,6 +1184,9 @@ set(Boost_ERROR_REASON) @@ -409,6 +409,22 @@ function(_Boost_GUESS_COMPILER_PREFIX _r
message (STATUS " ${COMPONENT}") set(${_ret} ${_boost_COMPILER} PARENT_SCOPE)
endif(NOT Boost_FIND_QUIETLY) endfunction()
set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
+ if(${UPPERCOMPONENT} STREQUAL "THREAD" AND UNIX) +function(_Boost_consider_adding_pthreads _outvar)
+ set(Boost_LIBRARIES ${Boost_LIBRARIES} pthread) + # On Unix platforms (excluding cygwin) add pthreads to Boost_LIBRARIES
+ endif(${UPPERCOMPONENT} STREQUAL "THREAD" AND UNIX) + # if the user is searching for the boost-thread component.
endif( Boost_${UPPERCOMPONENT}_FOUND ) + if(UNIX AND NOT CYGWIN)
endforeach(COMPONENT) + list(FIND Boost_FIND_COMPONENTS thread _using_boost_thread)
+ if(_using_boost_thread GREATER -1)
+ find_library(BOOST_THREAD_LIBRARY NAMES pthread
+ DOC "The threading library used by boost-thread"
+ )
+ if(BOOST_THREAD_LIBRARY)
+ set(${_outvar} ${ARGN} ${BOOST_THREAD_LIBRARY} PARENT_SCOPE)
+ endif()
+ endif()
+ endif()
+endfunction()
+
#
# End functions/macros
#
@@ -1091,6 +1107,9 @@ if(Boost_FOUND)
list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
endif()
endforeach()
+
+ # Add pthread library on UNIX if thread component was found
+ _Boost_consider_adding_pthreads(Boost_LIBRARIES ${Boost_LIBRARIES})
else() else()
if(Boost_FIND_REQUIRED)
message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")

Loading…
Cancel
Save