aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2017-12-13 18:50:27 -0800
committerGravatar GitHub <noreply@github.com>2017-12-13 18:50:27 -0800
commitb2c389352fa0dc6f0636e2806d525174315128af (patch)
tree0d0dd9228e5b70121ac25fe1293535e93b093494
parentcd0d7547bcf448ca4e0cb7340aca374adcb7afab (diff)
parent3fc14dc979d6227d85d3540412db12b69300210d (diff)
Merge pull request #13769 from jtattermusch/cmake_exclude_custom_ares
Exclude artificial ares target when building with cmake
-rw-r--r--CMakeLists.txt86
-rw-r--r--templates/CMakeLists.txt.template2
2 files changed, 1 insertions, 87 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd7dbce2e5..be7378c3cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4683,92 +4683,6 @@ endif()
if (gRPC_BUILD_TESTS)
-add_library(ares
- third_party/cares/cares/ares__close_sockets.c
- third_party/cares/cares/ares__get_hostent.c
- third_party/cares/cares/ares__read_line.c
- third_party/cares/cares/ares__timeval.c
- third_party/cares/cares/ares_cancel.c
- third_party/cares/cares/ares_create_query.c
- third_party/cares/cares/ares_data.c
- third_party/cares/cares/ares_destroy.c
- third_party/cares/cares/ares_expand_name.c
- third_party/cares/cares/ares_expand_string.c
- third_party/cares/cares/ares_fds.c
- third_party/cares/cares/ares_free_hostent.c
- third_party/cares/cares/ares_free_string.c
- third_party/cares/cares/ares_getenv.c
- third_party/cares/cares/ares_gethostbyaddr.c
- third_party/cares/cares/ares_gethostbyname.c
- third_party/cares/cares/ares_getnameinfo.c
- third_party/cares/cares/ares_getopt.c
- third_party/cares/cares/ares_getsock.c
- third_party/cares/cares/ares_init.c
- third_party/cares/cares/ares_library_init.c
- third_party/cares/cares/ares_llist.c
- third_party/cares/cares/ares_mkquery.c
- third_party/cares/cares/ares_nowarn.c
- third_party/cares/cares/ares_options.c
- third_party/cares/cares/ares_parse_a_reply.c
- third_party/cares/cares/ares_parse_aaaa_reply.c
- third_party/cares/cares/ares_parse_mx_reply.c
- third_party/cares/cares/ares_parse_naptr_reply.c
- third_party/cares/cares/ares_parse_ns_reply.c
- third_party/cares/cares/ares_parse_ptr_reply.c
- third_party/cares/cares/ares_parse_soa_reply.c
- third_party/cares/cares/ares_parse_srv_reply.c
- third_party/cares/cares/ares_parse_txt_reply.c
- third_party/cares/cares/ares_platform.c
- third_party/cares/cares/ares_process.c
- third_party/cares/cares/ares_query.c
- third_party/cares/cares/ares_search.c
- third_party/cares/cares/ares_send.c
- third_party/cares/cares/ares_strcasecmp.c
- third_party/cares/cares/ares_strdup.c
- third_party/cares/cares/ares_strerror.c
- third_party/cares/cares/ares_timeout.c
- third_party/cares/cares/ares_version.c
- third_party/cares/cares/ares_writev.c
- third_party/cares/cares/bitncmp.c
- third_party/cares/cares/inet_net_pton.c
- third_party/cares/cares/inet_ntop.c
- third_party/cares/cares/windows_port.c
-)
-
-if(WIN32 AND MSVC)
- set_target_properties(ares PROPERTIES COMPILE_PDB_NAME "ares"
- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
- )
- if (gRPC_INSTALL)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ares.pdb
- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
- )
- endif()
-endif()
-
-
-target_include_directories(ares
- PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${BORINGSSL_ROOT_DIR}/include
- PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${ZLIB_INCLUDE_DIR}
- PRIVATE ${BENCHMARK}/include
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
- PRIVATE ${CARES_INCLUDE_DIR}
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
-)
-
-target_link_libraries(ares
- ${_gRPC_SSL_LIBRARIES}
- ${_gRPC_ALLTARGETS_LIBRARIES}
-)
-
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
add_library(bad_client_test
test/core/bad_client/bad_client.cc
)
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index f89371057f..5ce38b557f 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -445,7 +445,7 @@
% for lib in libs:
% if lib.build in ["all", "protoc", "tool", "test", "private"] and not lib.boringssl:
% if not lib.get('build_system', []) or 'cmake' in lib.get('build_system', []):
- % if not lib.name in ['benchmark', 'z']: # we build these using CMake instead
+ % if not lib.name in ['ares', 'benchmark', 'z']: # we build these using CMake instead
% if lib.build in ["test", "private"]:
if (gRPC_BUILD_TESTS)
${cc_library(lib)}