mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-06 10:25:18 +00:00
THRIFT-3097 cmake targets unconditionally depend on optional libraries
This commit is contained in:
parent
a242c28ba1
commit
7f47792bf2
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user