[Cmake-commits] CMake branch, next, updated. v2.8.11-2209-g9cd173a
Matthew Woehlke
matthew.woehlke at kitware.com
Fri May 24 16:06:12 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 9cd173a67f7af3c8717369beef1fa42a19b88289 (commit)
via 8961c4b68bdf3202be0451a68418922cf869439c (commit)
from fa0530550650e586c9b642d84cd689456c73d283 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cd173a67f7af3c8717369beef1fa42a19b88289
commit 9cd173a67f7af3c8717369beef1fa42a19b88289
Merge: fa05305 8961c4b
Author: Matthew Woehlke <matthew.woehlke at kitware.com>
AuthorDate: Fri May 24 16:06:10 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 24 16:06:10 2013 -0400
Merge topic 'fix-protobuf-threads' into next
8961c4b FindProtobuf: also find pthread
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8961c4b68bdf3202be0451a68418922cf869439c
commit 8961c4b68bdf3202be0451a68418922cf869439c
Author: Matthew Woehlke <matthew.woehlke at kitware.com>
AuthorDate: Wed May 8 16:04:30 2013 -0400
Commit: Matthew Woehlke <matthew.woehlke at kitware.com>
CommitDate: Fri May 24 15:44:10 2013 -0400
FindProtobuf: also find pthread
Modify FindProtobuf.cmake to find the pthread library on UNIX platforms,
and to add the same to PROTOBUF_LIBRARIES, as this is a link dependency
of libraries using the protobuf headers.
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index af0c2dd..2972198 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -156,6 +156,16 @@ function(_protobuf_find_libraries name filename)
endif()
endfunction()
+# Internal function: find threads library
+function(_protobuf_find_threads)
+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+ find_package(Threads)
+ if(Threads_FOUND)
+ list(APPEND PROTOBUF_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ set(PROTOBUF_LIBRARIES "${PROTOBUF_LIBRARIES}" PARENT_SCOPE)
+ endif()
+endfunction()
+
#
# Main.
#
@@ -190,6 +200,9 @@ if(MSVC)
set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}")
endif()
+if(UNIX)
+ _protobuf_find_threads()
+endif()
# Find the include directory
find_path(PROTOBUF_INCLUDE_DIR
-----------------------------------------------------------------------
Summary of changes:
Modules/FindProtobuf.cmake | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list