You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2015/04/15 22:19:18 UTC

[1/2] thrift git commit: THRIFT-3097 cmake targets unconditionally depend on optional libraries Consider also cases of missing ZLIB and missing OpenSSL.

Repository: thrift
Updated Branches:
  refs/heads/master a242c28ba -> fdf019810


THRIFT-3097 cmake targets unconditionally depend on optional libraries Consider also cases of missing ZLIB and missing OpenSSL.


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/fdf01981
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/fdf01981
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/fdf01981

Branch: refs/heads/master
Commit: fdf0198103fddf9cd43955da5eee9dc4c02ef9b4
Parents: 7f47792
Author: Marco Molteni <ma...@laposte.net>
Authored: Wed Apr 15 21:22:41 2015 +0200
Committer: Roger Meier <ro...@apache.org>
Committed: Wed Apr 15 22:04:49 2015 +0200

----------------------------------------------------------------------
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/fdf01981/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f19f999..386a63d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,10 +75,10 @@ endif()
 if(WITH_CPP)
     add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp)
     if(BUILD_TESTING)
-        if(WITH_LIBEVENT)
+        if(WITH_LIBEVENT AND WITH_ZLIB AND WITH_OPENSSL)
             add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)
         else()
-            message(WARNING "libevent not found or disabled; will not build some tests")
+            message(WARNING "libevent and/or ZLIB and/or OpenSSL not found or disabled; will not build some tests")
         endif()
     endif()
 endif()


[2/2] thrift git commit: THRIFT-3097 cmake targets unconditionally depend on optional libraries

Posted by ro...@apache.org.
THRIFT-3097 cmake targets unconditionally depend on optional libraries


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/7f47792b
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/7f47792b
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/7f47792b

Branch: refs/heads/master
Commit: 7f47792bf288c3dca049d04de06d57d2f060abba
Parents: a242c28
Author: Marco Molteni <ma...@laposte.net>
Authored: Wed Apr 15 20:46:48 2015 +0200
Committer: Roger Meier <ro...@apache.org>
Committed: Wed Apr 15 22:04:49 2015 +0200

----------------------------------------------------------------------
 CMakeLists.txt                  | 6 +++++-
 build/cmake/DefineOptions.cmake | 7 ++++---
 lib/py/CMakeLists.txt           | 2 ++
 3 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/7f47792b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2800167..f19f999 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,7 +75,11 @@ endif()
 if(WITH_CPP)
     add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp)
     if(BUILD_TESTING)
-        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)
+        if(WITH_LIBEVENT)
+            add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)
+        else()
+            message(WARNING "libevent not found or disabled; will not build some tests")
+        endif()
     endif()
 endif()
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/7f47792b/build/cmake/DefineOptions.cmake
----------------------------------------------------------------------
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index f2eb76d..7d8b032 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -24,7 +24,7 @@ include(CMakeDependentOption)
 option(BUILD_COMPILER "Build Thrift compiler" ON)
 option(BUILD_TESTING "Build with unit tests" ON)
 option(BUILD_EXAMPLES "Build examples" ON)
-option(BUILD_LIBRARIES "Build Thrfit libraries" ON)
+option(BUILD_LIBRARIES "Build Thrift libraries" ON)
 
 # Libraries to build
 
@@ -74,9 +74,10 @@ CMAKE_DEPENDENT_OPTION(WITH_JAVA "Build Java library" ON
                        "BUILD_LIBRARIES;JAVA_FOUND;ANT_FOUND" OFF)
 
 # Python
-include(FindPythonInterp QUIET)
+include(FindPythonInterp QUIET) # for Python executable
+include(FindPythonLibs QUIET) # for Python.h
 CMAKE_DEPENDENT_OPTION(WITH_PYTHON "Build Python library" ON
-                       "BUILD_LIBRARIES;PYTHONINTERP_FOUND" OFF)
+                       "BUILD_LIBRARIES;PYTHONLIBS_FOUND" OFF)
 
 # Common library options
 option(WITH_SHARED_LIB "Build shared libraries" ON)

http://git-wip-us.apache.org/repos/asf/thrift/blob/7f47792b/lib/py/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/lib/py/CMakeLists.txt b/lib/py/CMakeLists.txt
index e92658d..ef987b6 100755
--- a/lib/py/CMakeLists.txt
+++ b/lib/py/CMakeLists.txt
@@ -17,6 +17,8 @@
 # under the License.
 #
 
+include_directories(${PYTHON_INCLUDE_DIRS})
+
 add_custom_target(python_build ALL
     COMMAND ${PYTHON_EXECUTABLE} setup.py build
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}