mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #11172 from vitlibar/grpc-improve-build-scripts
Improve build scripts for protobuf & gRPC
This commit is contained in:
commit
e27ded8798
@ -1,57 +1,26 @@
|
||||
set(_PROTOBUF_PROTOC $<TARGET_FILE:protoc>)
|
||||
set(_GRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:grpc_cpp_plugin>)
|
||||
option (ENABLE_GRPC "Use gRPC" ${ENABLE_LIBRARIES})
|
||||
|
||||
function(PROTOBUF_GENERATE_GRPC_CPP SRCS HDRS)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
if (ENABLE_GRPC)
|
||||
option (USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
if (USE_INTERNAL_GRPC_LIBRARY)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/include/grpc++/grpc++.h")
|
||||
message(WARNING "submodule contrib/grpc is missing. To fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
||||
elif (NOT USE_PROTOBUF)
|
||||
message(WARNING "gRPC requires protobuf which is disabled")
|
||||
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
||||
else()
|
||||
set (GRPC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc/include")
|
||||
set (GRPC_LIBRARY "libgrpc++")
|
||||
set (USE_GRPC ON)
|
||||
endif()
|
||||
else()
|
||||
find_package(grpc)
|
||||
if (GRPC_INCLUDE_DIR AND GRPC_LIBRARY)
|
||||
set (USE_GRPC ON)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED PROTOBUF_IMPORT_DIRS)
|
||||
foreach(DIR ${Protobuf_IMPORT_DIRS})
|
||||
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(${SRCS})
|
||||
set(${HDRS})
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(FIL_WE ${FIL} NAME_WE)
|
||||
|
||||
list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc")
|
||||
list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.grpc.pb.h"
|
||||
COMMAND ${_PROTOBUF_PROTOC}
|
||||
ARGS --grpc_out=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--plugin=protoc-gen-grpc=${_GRPC_CPP_PLUGIN_EXECUTABLE}
|
||||
${_protobuf_include_path} ${ABS_FIL}
|
||||
DEPENDS ${ABS_FIL}
|
||||
COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}"
|
||||
VERBATIM)
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
|
||||
set(${SRCS} ${${SRCS}} PARENT_SCOPE)
|
||||
set(${HDRS} ${${HDRS}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
message(STATUS "Using gRPC=${USE_GRPC}: ${GRPC_INCLUDE_DIR} : ${GRPC_LIBRARY}")
|
||||
|
@ -28,68 +28,6 @@ elseif(NOT MISSING_INTERNAL_PROTOBUF_LIBRARY)
|
||||
set(Protobuf_LITE_LIBRARY libprotobuf-lite)
|
||||
|
||||
set(Protobuf_PROTOC_EXECUTABLE "$<TARGET_FILE:protoc>")
|
||||
|
||||
if(NOT DEFINED PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
set(PROTOBUF_GENERATE_CPP_APPEND_PATH TRUE)
|
||||
endif()
|
||||
|
||||
function(PROTOBUF_GENERATE_CPP SRCS HDRS)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
# Create an include path for each file specified
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
|
||||
set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}")
|
||||
endif()
|
||||
|
||||
if(DEFINED Protobuf_IMPORT_DIRS)
|
||||
foreach(DIR ${Protobuf_IMPORT_DIRS})
|
||||
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(${SRCS})
|
||||
set(${HDRS})
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(FIL_WE ${FIL} NAME_WE)
|
||||
|
||||
list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
|
||||
list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
|
||||
COMMAND ${Protobuf_PROTOC_EXECUTABLE}
|
||||
ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
|
||||
DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${FIL}"
|
||||
VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
|
||||
set(${SRCS} ${${SRCS}} PARENT_SCOPE)
|
||||
set(${HDRS} ${${HDRS}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
endif()
|
||||
|
||||
if(OS_FREEBSD AND SANITIZE STREQUAL "address")
|
||||
@ -102,6 +40,7 @@ if(OS_FREEBSD AND SANITIZE STREQUAL "address")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include (${ClickHouse_SOURCE_DIR}/cmake/protobuf_generate_cpp.cmake)
|
||||
endif()
|
||||
|
||||
message(STATUS "Using protobuf=${USE_PROTOBUF}: ${Protobuf_INCLUDE_DIR} : ${Protobuf_LIBRARY} : ${Protobuf_PROTOC_EXECUTABLE}")
|
||||
|
166
cmake/protobuf_generate_cpp.cmake
Normal file
166
cmake/protobuf_generate_cpp.cmake
Normal file
@ -0,0 +1,166 @@
|
||||
# This file declares functions adding custom commands for generating C++ files from *.proto files:
|
||||
# function (protobuf_generate_cpp SRCS HDRS)
|
||||
# function (protobuf_generate_grpc_cpp SRCS HDRS)
|
||||
|
||||
if (NOT USE_PROTOBUF)
|
||||
message (WARNING "Could not use protobuf_generate_cpp() without the protobuf library")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PROTOBUF_PROTOC_EXECUTABLE)
|
||||
set (PROTOBUF_PROTOC_EXECUTABLE "$<TARGET_FILE:protoc>")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED GRPC_CPP_PLUGIN_EXECUTABLE)
|
||||
set (GRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:grpc_cpp_plugin>)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
set (PROTOBUF_GENERATE_CPP_APPEND_PATH TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
function(protobuf_generate_cpp_impl SRCS HDRS MODES OUTPUT_FILE_EXTS PLUGIN)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: protobuf_generate_cpp() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
# Create an include path for each file specified
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
|
||||
list(FIND protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
|
||||
set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}")
|
||||
endif()
|
||||
|
||||
if(DEFINED Protobuf_IMPORT_DIRS)
|
||||
foreach(DIR ${Protobuf_IMPORT_DIRS})
|
||||
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
|
||||
list(FIND protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set (intermediate_dir ${CMAKE_CURRENT_BINARY_DIR}/intermediate)
|
||||
|
||||
set (protoc_args)
|
||||
foreach (mode ${MODES})
|
||||
list (APPEND protoc_args "--${mode}_out" ${intermediate_dir})
|
||||
endforeach()
|
||||
if (PLUGIN)
|
||||
list (APPEND protoc_args "--plugin=${PLUGIN}")
|
||||
endif()
|
||||
|
||||
set(srcs)
|
||||
set(hdrs)
|
||||
set(all_intermediate_outputs)
|
||||
|
||||
foreach(input_name ${ARGN})
|
||||
get_filename_component(abs_name ${input_name} ABSOLUTE)
|
||||
get_filename_component(name ${input_name} NAME_WE)
|
||||
|
||||
set (intermediate_outputs)
|
||||
foreach (ext ${OUTPUT_FILE_EXTS})
|
||||
set (filename "${name}${ext}")
|
||||
set (output "${CMAKE_CURRENT_BINARY_DIR}/${filename}")
|
||||
set (intermediate_output "${intermediate_dir}/${filename}")
|
||||
list (APPEND intermediate_outputs "${intermediate_output}")
|
||||
list (APPEND all_intermediate_outputs "${intermediate_output}")
|
||||
|
||||
if (${ext} MATCHES ".*\\.h")
|
||||
list(APPEND hdrs "${output}")
|
||||
else()
|
||||
list(APPEND srcs "${output}")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output}
|
||||
COMMAND ${CMAKE_COMMAND} -DPROTOBUF_GENERATE_CPP_SCRIPT_MODE=1 -DUSE_PROTOBUF=1 -DDIR=${CMAKE_CURRENT_BINARY_DIR} -DFILENAME=${filename} -DCOMPILER_ID=${CMAKE_CXX_COMPILER_ID} -P ${ClickHouse_SOURCE_DIR}/cmake/protobuf_generate_cpp.cmake
|
||||
DEPENDS ${intermediate_output})
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${intermediate_outputs}
|
||||
COMMAND ${Protobuf_PROTOC_EXECUTABLE}
|
||||
ARGS ${protobuf_include_path} ${protoc_args} ${abs_name}
|
||||
DEPENDS ${abs_name} ${Protobuf_PROTOC_EXECUTABLE} ${PLUGIN}
|
||||
COMMENT "Running C++ protocol buffer compiler on ${name}"
|
||||
VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set_source_files_properties(${srcs} ${hdrs} ${all_intermediate_outputs} PROPERTIES GENERATED TRUE)
|
||||
set(${SRCS} ${srcs} PARENT_SCOPE)
|
||||
set(${HDRS} ${hdrs} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
if (PROTOBUF_GENERATE_CPP_SCRIPT_MODE)
|
||||
set (output "${DIR}/${FILENAME}")
|
||||
set (intermediate_dir ${DIR}/intermediate)
|
||||
set (intermediate_output "${intermediate_dir}/${FILENAME}")
|
||||
|
||||
if (COMPILER_ID STREQUAL "GNU")
|
||||
set (pragma_push "#pragma GCC diagnostic push\n")
|
||||
set (pragma_pop "#pragma GCC diagnostic pop\n")
|
||||
set (pragma_disable_warnings "#pragma GCC diagnostic ignored \"-Wall\"\n"
|
||||
"#pragma GCC diagnostic ignored \"-Wextra\"\n"
|
||||
"#pragma GCC diagnostic ignored \"-Warray-bounds\"\n")
|
||||
elseif (COMPILER_ID MATCHES "Clang")
|
||||
set (pragma_push "#pragma clang diagnostic push\n")
|
||||
set (pragma_pop "#pragma clang diagnostic pop\n")
|
||||
set (pragma_disable_warnings "#pragma clang diagnostic ignored \"-Weverything\"\n")
|
||||
endif()
|
||||
|
||||
if (${FILENAME} MATCHES ".*\\.h")
|
||||
file(WRITE "${output}"
|
||||
"#pragma once\n"
|
||||
${pragma_push}
|
||||
${pragma_disable_warnings}
|
||||
"#include \"${intermediate_output}\"\n"
|
||||
${pragma_pop}
|
||||
)
|
||||
else()
|
||||
file(WRITE "${output}"
|
||||
${pragma_disable_warnings}
|
||||
"#include \"${intermediate_output}\"\n"
|
||||
)
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
function(protobuf_generate_cpp SRCS HDRS)
|
||||
set (modes cpp)
|
||||
set (output_file_exts ".pb.cc" ".pb.h")
|
||||
set (plugin)
|
||||
|
||||
protobuf_generate_cpp_impl(srcs hdrs "${modes}" "${output_file_exts}" "${plugin}" ${ARGN})
|
||||
|
||||
set(${SRCS} ${srcs} PARENT_SCOPE)
|
||||
set(${HDRS} ${hdrs} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(protobuf_generate_grpc_cpp SRCS HDRS)
|
||||
set (modes cpp grpc)
|
||||
set (output_file_exts ".pb.cc" ".pb.h" ".grpc.pb.cc" ".grpc.pb.h")
|
||||
set (plugin "protoc-gen-grpc=${GRPC_CPP_PLUGIN_EXECUTABLE}")
|
||||
|
||||
protobuf_generate_cpp_impl(srcs hdrs "${modes}" "${output_file_exts}" "${plugin}" ${ARGN})
|
||||
|
||||
set(${SRCS} ${srcs} PARENT_SCOPE)
|
||||
set(${HDRS} ${hdrs} PARENT_SCOPE)
|
||||
endfunction()
|
14
contrib/CMakeLists.txt
vendored
14
contrib/CMakeLists.txt
vendored
@ -21,7 +21,6 @@ add_subdirectory (consistent-hashing-sumbur)
|
||||
add_subdirectory (consistent-hashing)
|
||||
add_subdirectory (croaring)
|
||||
add_subdirectory (FastMemcpy)
|
||||
add_subdirectory (grpc-cmake)
|
||||
add_subdirectory (jemalloc-cmake)
|
||||
add_subdirectory (libcpuid-cmake)
|
||||
add_subdirectory (murmurhash)
|
||||
@ -260,20 +259,17 @@ if (USE_INTERNAL_BROTLI_LIBRARY)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
set(protobuf_BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
|
||||
else ()
|
||||
set(protobuf_BUILD_SHARED_LIBS ON CACHE INTERNAL "" FORCE)
|
||||
endif ()
|
||||
set(protobuf_WITH_ZLIB 0 CACHE INTERNAL "" FORCE) # actually will use zlib, but skip find
|
||||
set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
|
||||
add_subdirectory(protobuf/cmake)
|
||||
add_subdirectory(protobuf-cmake)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_HDFS3_LIBRARY)
|
||||
add_subdirectory(libhdfs3-cmake)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_GRPC_LIBRARY)
|
||||
add_subdirectory(grpc-cmake)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_AWS_S3_LIBRARY)
|
||||
set (save_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
set (save_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
|
||||
|
2
contrib/grpc
vendored
2
contrib/grpc
vendored
@ -1 +1 @@
|
||||
Subproject commit c1d176528fd8da9dd4066d16554bcd216d29033f
|
||||
Subproject commit 8aea4e168e78f3eb9828080740fc8cb73d53bf79
|
@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.5.1)
|
||||
set(GRPC_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/grpc)
|
||||
set(GRPC_INCLUDE_DIR ${GRPC_SOURCE_DIR}/include/)
|
||||
set(GRPC_BINARY_DIR ${ClickHouse_BINARY_DIR}/contrib/grpc)
|
||||
|
||||
|
||||
if(UNIX)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(_gRPC_PLATFORM_LINUX ON)
|
||||
@ -14,72 +16,28 @@ if(UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_gRPC_C_CXX_FLAGS} -w")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_gRPC_C_CXX_FLAGS} -w")
|
||||
|
||||
set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf")
|
||||
|
||||
if(gRPC_BACKWARDS_COMPATIBILITY_MODE)
|
||||
add_definitions(-DGPR_BACKWARDS_COMPATIBILITY_MODE)
|
||||
if (_gRPC_PLATFORM_MAC)
|
||||
# some C++11 constructs not supported before OS X 10.9
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
|
||||
endif()
|
||||
if(_gRPC_PLATFORM_MAC)
|
||||
set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} m pthread)
|
||||
elseif(UNIX)
|
||||
set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} rt m pthread)
|
||||
endif()
|
||||
|
||||
if (_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC)
|
||||
set(_gRPC_CORE_NOSTDCXX_FLAGS -fno-exceptions -fno-rtti)
|
||||
else()
|
||||
set(_gRPC_CORE_NOSTDCXX_FLAGS "")
|
||||
endif()
|
||||
|
||||
# address_sorting.cmake
|
||||
include(${GRPC_SOURCE_DIR}/cmake/address_sorting.cmake)
|
||||
set(_gRPC_ADDRESS_SORTING_INCLUDE_DIR "${GRPC_SOURCE_DIR}/third_party/address_sorting/include")
|
||||
set(_gRPC_ADDRESS_SORTING_LIBRARIES address_sorting)
|
||||
|
||||
# cares.cmake
|
||||
set(CARES_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/cares/cares)
|
||||
set(CARES_BINARY_DIR ${GRPC_BINARY_DIR}/third_party/cares/cares)
|
||||
set(CARES_SHARED OFF CACHE BOOL "disable shared library")
|
||||
set(CARES_STATIC ON CACHE BOOL "link cares statically")
|
||||
if(gRPC_BACKWARDS_COMPATIBILITY_MODE)
|
||||
# See https://github.com/grpc/grpc/issues/17255
|
||||
set(HAVE_LIBNSL OFF CACHE BOOL "avoid cares dependency on libnsl")
|
||||
set(CARES_SHARED ${BUILD_SHARED_LIBS} CACHE BOOL "" FORCE)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CARES_STATIC OFF CACHE BOOL "" FORCE)
|
||||
else()
|
||||
set(CARES_STATIC ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
set(_gRPC_CARES_LIBRARIES c-ares)
|
||||
add_subdirectory(${CARES_ROOT_DIR} ${CARES_BINARY_DIR})
|
||||
if(TARGET c-ares)
|
||||
set(_gRPC_CARES_LIBRARIES c-ares)
|
||||
endif()
|
||||
|
||||
# protobuf.cmake
|
||||
set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../protobuf)
|
||||
|
||||
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
|
||||
if(NOT protobuf_WITH_ZLIB)
|
||||
set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.")
|
||||
endif()
|
||||
set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
|
||||
|
||||
set(_gRPC_PROTOBUF_LIBRARIES libprotobuf)
|
||||
set(_gRPC_PROTOBUF_PROTOC_LIBRARIES libprotoc)
|
||||
set(_gRPC_PROTOBUF_PROTOC protoc)
|
||||
set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE $<TARGET_FILE:protoc>)
|
||||
set(_gRPC_PROTOBUF_INCLUDE_DIR "${PROTOBUF_ROOT_DIR}/src")
|
||||
|
||||
if(gRPC_INSTALL)
|
||||
message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_PROTOBUF_PROVIDER is \"module\"")
|
||||
set(gRPC_INSTALL FALSE)
|
||||
endif()
|
||||
|
||||
# ssl.cmake
|
||||
set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../ssl)
|
||||
if(TARGET ssl)
|
||||
set(_gRPC_SSL_LIBRARIES ssl)
|
||||
set(_gRPC_SSL_INCLUDE_DIR ${BORINGSSL_ROOT_DIR}/include)
|
||||
endif()
|
||||
|
||||
# upb.cmake
|
||||
set(UPB_ROOT_DIR ${GRPC_SOURCE_DIR}/third_party/upb)
|
||||
@ -87,23 +45,20 @@ set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}")
|
||||
set(_gRPC_UPB_GRPC_GENERATED_DIR "${GRPC_SOURCE_DIR}/src/core/ext/upb-generated")
|
||||
set(_gRPC_UPB_LIBRARIES upb)
|
||||
|
||||
# protobuf.cmake
|
||||
set(_gRPC_PROTOBUF_INCLUDE_DIR ${Protobuf_INCLUDE_DIR})
|
||||
set(_gRPC_PROTOBUF_LIBRARIES ${Protobuf_LIBRARY})
|
||||
set(_gRPC_PROTOBUF_PROTOC_LIBRARIES ${Protobuf_PROTOC_LIBRARY})
|
||||
set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${Protobuf_PROTOC_EXECUTABLE})
|
||||
|
||||
# ssl.cmake
|
||||
set(_gRPC_SSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
|
||||
set(_gRPC_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
|
||||
|
||||
# zlib.cmake
|
||||
set(ZLIB_ROOT_DIR ${GRPC_SOURCE_DIR}/../zlib-ng)
|
||||
include_directories("${ZLIB_ROOT_DIR}")
|
||||
## add_subdirectory(${ZLIB_ROOT_DIR} ${ZLIB_ROOT_DIR})
|
||||
if(TARGET zlibstatic)
|
||||
set(_gRPC_ZLIB_LIBRARIES zlibstatic)
|
||||
set(_gRPC_ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}" "${GRPC_SOURCE_DIR}/third_party/zlib")
|
||||
endif()
|
||||
set(_gRPC_ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR})
|
||||
set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if(_gRPC_PLATFORM_MAC)
|
||||
set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} m pthread)
|
||||
elseif(UNIX)
|
||||
set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} rt m pthread)
|
||||
endif()
|
||||
|
||||
add_library(address_sorting
|
||||
${GRPC_SOURCE_DIR}/third_party/address_sorting/address_sorting.c
|
||||
@ -112,7 +67,6 @@ add_library(address_sorting
|
||||
)
|
||||
|
||||
target_include_directories(address_sorting
|
||||
PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${GRPC_SOURCE_DIR}/include>
|
||||
PRIVATE ${GRPC_SOURCE_DIR}
|
||||
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
|
||||
@ -124,11 +78,11 @@ target_include_directories(address_sorting
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(address_sorting
|
||||
${_gRPC_BASELIB_LIBRARIES}
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
add_library(gpr
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/gpr/alloc.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/gpr/atm.cc
|
||||
@ -184,6 +138,7 @@ target_include_directories(gpr
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(gpr
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
@ -569,7 +524,6 @@ add_library(grpc
|
||||
${GRPC_SOURCE_DIR}/src/core/plugin_registry/grpc_plugin_registry.cc
|
||||
)
|
||||
|
||||
target_compile_options(grpc PUBLIC -fpermissive)
|
||||
|
||||
target_include_directories(grpc
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
@ -583,8 +537,8 @@ target_include_directories(grpc
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(grpc
|
||||
${_gRPC_BASELIB_LIBRARIES}
|
||||
${_gRPC_SSL_LIBRARIES}
|
||||
${_gRPC_ZLIB_LIBRARIES}
|
||||
${_gRPC_CARES_LIBRARIES}
|
||||
@ -597,352 +551,6 @@ if (_gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc "-framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
add_library(grpc_cronet
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/plugin_registry/grpc_cronet_plugin_registry.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/init.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/avl/avl.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/backoff/backoff.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_args.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_stack_builder.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/channel_trace.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/channelz_registry.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/connected_channel.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/handshaker_registry.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/channel/status_util.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/compression.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_args.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/compression_internal.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/message_compress.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_gzip.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/compression/stream_compression_identity.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/debug/stats.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/debug/stats_data.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/http/format_request.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/http/parser.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/buffer_list.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/call_combiner.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/cfstream_handle.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/combiner.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_cfstream.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_uv.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/endpoint_pair_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/error_cfstream.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epoll1_linux.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_epollex_linux.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_poll_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/ev_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/exec_ctx.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/mpmcqueue.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/executor/threadpool.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/fork_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_fallback.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_host_name_max.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/gethostname_sysconf.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/internal_errqueue.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iocp_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_internal.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_posix_cfstream.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_uv.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/iomgr_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/is_epollexclusive_available.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/load_file.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/lockfree_event.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/polling_entity.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_set_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_uv.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/pollset_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resolve_address_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/resource_quota.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/sockaddr_utils.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_factory_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_mutator.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_common_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_linux.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_uv.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_utils_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/socket_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_cfstream.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_client_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_common.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_server_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_uv.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/tcp_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/time_averaged_stats.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_custom.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_generic.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_heap.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_manager.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/timer_uv.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/udp_server.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/unix_sockets_posix_noop.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_eventfd.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_nospecial.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_pipe.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/iomgr/wakeup_fd_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/json/json.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/json/json_reader.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/json/json_string.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/json/json_writer.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/slice/b64.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/slice/percent_encoding.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/slice/slice.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_buffer.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_intern.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/slice/slice_string_helpers.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/api_trace.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/byte_buffer_reader.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/call.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/call_details.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/call_log_batch.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/channel.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_init.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_ping.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/channel_stack_type.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/completion_queue_factory.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/event_string.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/lame_client.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/metadata_array.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/server.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/validate_metadata.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/version.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/bdp_estimator.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/byte_stream.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/connectivity_state.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/error_utils.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/metadata_batch.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/pid_controller.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/static_metadata.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/status_conversion.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/status_metadata.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/timeout_encoding.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/transport.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/transport/transport_op_string.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/uri/uri_parser.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/debug/trace.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/cronet/transport/cronet_transport.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_decoder.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/bin_encoder.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/context_list.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/flow_control.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_data.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_goaway.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_ping.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_settings.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/frame_window_update.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/hpack_table.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/http2_settings.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/huffsyms.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/incoming_metadata.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/parsing.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_lists.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/stream_map.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/varint.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/transport/writing.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/alpn/alpn.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/http/client/http_client_filter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/http/http_filters_plugin.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/http/message_compress/message_compress_filter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/http/server/http_server_filter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backend_metric.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/backup_poller.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/channel_connectivity.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_channelz.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_factory.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/client_channel_plugin.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/global_subchannel_pool.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/health/health_check_client.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_connect_handshaker.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/http_proxy.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/lb_policy_registry.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/local_subchannel_pool.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/parse_address.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/proxy_mapper_registry.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_registry.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolver_result_parsing.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/resolving_lb_policy.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/retry_throttle.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/server_address.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/service_config.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/client_channel/subchannel_pool_interface.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/filters/deadline/deadline_filter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c
|
||||
${GRPC_SOURCE_DIR}/third_party/upb/upb/decode.c
|
||||
${GRPC_SOURCE_DIR}/third_party/upb/upb/encode.c
|
||||
${GRPC_SOURCE_DIR}/third_party/upb/upb/msg.c
|
||||
${GRPC_SOURCE_DIR}/third_party/upb/upb/port.c
|
||||
${GRPC_SOURCE_DIR}/third_party/upb/upb/table.c
|
||||
${GRPC_SOURCE_DIR}/third_party/upb/upb/upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/gogoproto/gogo.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/validate/validate.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/annotations.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/api/http.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/any.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/duration.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/empty.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/struct.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/google/rpc/status.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/http/httpcli_security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/context/security_context.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/alts_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/composite/composite_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/credentials_metadata.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/fake/fake_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/google_default/credentials_generic.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/google_default/google_default_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/iam/iam_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/json_token.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/jwt_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/jwt/jwt_verifier.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/local/local_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/plugin/plugin_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/ssl/ssl_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/tls/spiffe_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/alts/alts_security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/fake/fake_security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/load_system_roots_fallback.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/load_system_roots_linux.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/local/local_security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl_utils.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/ssl_utils_config.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/transport/client_auth_filter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/transport/secure_endpoint.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/transport/security_handshaker.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/transport/server_auth_filter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/transport/target_authority_table.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/transport/tsi_error.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/util/json_util.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/init_secure.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/crypt/aes_gcm.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/crypt/gsec.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_counter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_crypter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_frame_protector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/frame_protector/frame_handler.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_handshaker_client.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_shared_resource.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/alts_tsi_utils.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/alts/handshaker/transport_security_common_api.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/transport_security.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/authority.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/ext/transport/chttp2/client/chttp2_connector.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/fake_transport_security.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/local_transport_security.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/ssl_transport_security.cc
|
||||
${GRPC_SOURCE_DIR}/src/core/tsi/transport_security_grpc.cc
|
||||
)
|
||||
|
||||
target_include_directories(grpc_cronet
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
PRIVATE ${GRPC_SOURCE_DIR}
|
||||
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(grpc_cronet
|
||||
${_gRPC_BASELIB_LIBRARIES}
|
||||
${_gRPC_SSL_LIBRARIES}
|
||||
${_gRPC_ZLIB_LIBRARIES}
|
||||
${_gRPC_CARES_LIBRARIES}
|
||||
${_gRPC_ADDRESS_SORTING_LIBRARIES}
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
gpr
|
||||
)
|
||||
if (_gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc_cronet "-framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
add_library(grpc_unsecure
|
||||
${GRPC_SOURCE_DIR}/src/core/lib/surface/init.cc
|
||||
@ -1249,19 +857,18 @@ add_library(grpc_unsecure
|
||||
${GRPC_SOURCE_DIR}/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
|
||||
)
|
||||
|
||||
|
||||
target_include_directories(grpc_unsecure
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
PRIVATE ${GRPC_SOURCE_DIR}
|
||||
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(grpc_unsecure
|
||||
${_gRPC_BASELIB_LIBRARIES}
|
||||
${_gRPC_ZLIB_LIBRARIES}
|
||||
@ -1271,10 +878,12 @@ target_link_libraries(grpc_unsecure
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
gpr
|
||||
)
|
||||
|
||||
if (_gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc_unsecure "-framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
|
||||
add_library(grpc++
|
||||
${GRPC_SOURCE_DIR}/src/cpp/client/insecure_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/cpp/client/secure_credentials.cc
|
||||
@ -1331,8 +940,6 @@ add_library(grpc++
|
||||
${GRPC_SOURCE_DIR}/src/cpp/codegen/codegen_init.cc
|
||||
)
|
||||
|
||||
target_compile_options(grpc++ PUBLIC -w)
|
||||
|
||||
target_include_directories(grpc++
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
PRIVATE ${GRPC_SOURCE_DIR}
|
||||
@ -1344,10 +951,9 @@ target_include_directories(grpc++
|
||||
PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTO_GENS_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(grpc++
|
||||
${_gRPC_BASELIB_LIBRARIES}
|
||||
${_gRPC_SSL_LIBRARIES}
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
@ -1355,6 +961,7 @@ target_link_libraries(grpc++
|
||||
gpr
|
||||
)
|
||||
|
||||
|
||||
add_library(grpc++_unsecure
|
||||
${GRPC_SOURCE_DIR}/src/cpp/client/insecure_credentials.cc
|
||||
${GRPC_SOURCE_DIR}/src/cpp/common/insecure_create_auth_context.cc
|
||||
@ -1404,21 +1011,19 @@ add_library(grpc++_unsecure
|
||||
${GRPC_SOURCE_DIR}/src/cpp/codegen/codegen_init.cc
|
||||
)
|
||||
|
||||
target_compile_options(grpc++_unsecure PUBLIC -w)
|
||||
|
||||
target_include_directories(grpc++_unsecure
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
PRIVATE ${GRPC_SOURCE_DIR}
|
||||
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTO_GENS_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(grpc++_unsecure
|
||||
${_gRPC_BASELIB_LIBRARIES}
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
@ -1427,6 +1032,16 @@ target_link_libraries(grpc++_unsecure
|
||||
grpc_unsecure
|
||||
)
|
||||
|
||||
|
||||
if (_gRPC_SSL_INCLUDE_DIR AND _gRPC_SSL_LIBRARIES)
|
||||
add_library(libgrpc ALIAS grpc)
|
||||
add_library(libgrpc++ ALIAS grpc++)
|
||||
else()
|
||||
add_library(libgrpc ALIAS grpc_unsecure)
|
||||
add_library(libgrpc++ ALIAS grpc++_unsecure)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(grpc_plugin_support
|
||||
${GRPC_SOURCE_DIR}/src/compiler/cpp_generator.cc
|
||||
)
|
||||
@ -1436,23 +1051,22 @@ target_include_directories(grpc_plugin_support
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTO_GENS_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(grpc_plugin_support
|
||||
${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
|
||||
${_gRPC_PROTOBUF_LIBRARIES}
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
add_executable(grpc_cpp_plugin
|
||||
${GRPC_SOURCE_DIR}/src/compiler/cpp_plugin.cc
|
||||
)
|
||||
@ -1461,16 +1075,13 @@ target_include_directories(grpc_cpp_plugin
|
||||
PRIVATE ${GRPC_SOURCE_DIR}
|
||||
PUBLIC ${GRPC_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_GRPC_GENERATED_DIR}
|
||||
PRIVATE ${_gRPC_UPB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
|
||||
PRIVATE ${_gRPC_PROTO_GENS_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(grpc_cpp_plugin
|
||||
@ -1479,4 +1090,3 @@ target_link_libraries(grpc_cpp_plugin
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
grpc_plugin_support
|
||||
)
|
||||
|
||||
|
13
contrib/protobuf-cmake/CMakeLists.txt
Normal file
13
contrib/protobuf-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
set(protobuf_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/protobuf)
|
||||
set(protobuf_BINARY_DIR ${ClickHouse_BINARY_DIR}/contrib/protobuf)
|
||||
|
||||
set(protobuf_WITH_ZLIB 0 CACHE INTERNAL "" FORCE) # actually will use zlib, but skip find
|
||||
set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
|
||||
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
set(protobuf_BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
|
||||
else ()
|
||||
set(protobuf_BUILD_SHARED_LIBS ON CACHE INTERNAL "" FORCE)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(${protobuf_SOURCE_DIR}/cmake ${protobuf_BINARY_DIR})
|
@ -9,4 +9,5 @@
|
||||
#cmakedefine01 USE_BROTLI
|
||||
#cmakedefine01 USE_UNWIND
|
||||
#cmakedefine01 USE_OPENCL
|
||||
#cmakedefine01 USE_GRPC
|
||||
#cmakedefine01 CLICKHOUSE_SPLIT_BINARY
|
||||
|
@ -53,6 +53,7 @@ const char * auto_config_build[]
|
||||
"USE_SSL", "@USE_SSL@",
|
||||
"USE_HYPERSCAN", "@USE_HYPERSCAN@",
|
||||
"USE_SIMDJSON", "@USE_SIMDJSON@",
|
||||
"USE_GRPC", "@USE_GRPC@",
|
||||
|
||||
nullptr, nullptr
|
||||
};
|
||||
|
@ -1,8 +1,6 @@
|
||||
# Disable clang-tidy for protobuf generated files
|
||||
set (CMAKE_CXX_CLANG_TIDY "")
|
||||
|
||||
add_compile_options(-Wno-zero-as-null-pointer-constant -Wno-array-bounds) # Protobuf generated files
|
||||
|
||||
if (USE_PROTOBUF)
|
||||
protobuf_generate_cpp(ProtobufDelimitedMessagesSerializer_Srcs ProtobufDelimitedMessagesSerializer_Hdrs ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/queries/0_stateless/00825_protobuf_format.proto)
|
||||
protobuf_generate_cpp(ProtobufDelimitedMessagesSerializer_Srcs2 ProtobufDelimitedMessagesSerializer_Hdrs2 ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/queries/0_stateless/00825_protobuf_format_syntax2.proto)
|
||||
|
Loading…
Reference in New Issue
Block a user