Skip to content

Commit

Permalink
Merge pull request grpc#21298 from grpc/revert-21196-zhen_alts_contex…
Browse files Browse the repository at this point in the history
…t_C++_2

Revert "[Exposing ALTS Context 2/2] Provide a Utility Function to Get Context"
  • Loading branch information
AspirinSJL authored Nov 27, 2019
2 parents aa40b1c + e3095a1 commit d0578ce
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 569 deletions.
16 changes: 0 additions & 16 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -428,22 +428,6 @@ grpc_cc_library(
],
)

grpc_cc_library(
name = "grpc++_alts",
srcs = [
"src/cpp/common/alts_context.cc",
],
hdrs = [
"include/grpcpp/alts_context.h",
],
language = "c++",
standalone = True,
deps = [
"grpc++",
"//src/proto/grpc/gcp:alts_handshaker_cc_proto",
],
)

grpc_cc_library(
name = "grpc_csharp_ext",
srcs = [
Expand Down
119 changes: 0 additions & 119 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,6 @@ protobuf_generate_grpc_cpp(
protobuf_generate_grpc_cpp(
src/proto/grpc/core/stats.proto
)
protobuf_generate_grpc_cpp(
src/proto/grpc/gcp/altscontext.proto
)
protobuf_generate_grpc_cpp(
src/proto/grpc/gcp/transport_security_common.proto
)
protobuf_generate_grpc_cpp(
src/proto/grpc/health/v1/health.proto
)
Expand Down Expand Up @@ -635,7 +629,6 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX)
add_dependencies(buildtests_cxx alts_concurrent_connectivity_test)
endif()
add_dependencies(buildtests_cxx alts_context_test)
add_dependencies(buildtests_cxx alts_counter_test)
add_dependencies(buildtests_cxx alts_crypt_test)
add_dependencies(buildtests_cxx alts_crypter_test)
Expand Down Expand Up @@ -3826,78 +3819,6 @@ if(gRPC_INSTALL)
)
endif()


if(gRPC_BUILD_CODEGEN)
add_library(grpc++_alts
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/altscontext.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/altscontext.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/altscontext.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/altscontext.grpc.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/transport_security_common.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/transport_security_common.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/transport_security_common.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/gcp/transport_security_common.grpc.pb.h
src/cpp/common/alts_context.cc
)

set_target_properties(grpc++_alts PROPERTIES
VERSION ${gRPC_CPP_VERSION}
SOVERSION ${gRPC_CPP_SOVERSION}
)

if(WIN32 AND MSVC)
set_target_properties(grpc++_alts PROPERTIES COMPILE_PDB_NAME "grpc++_alts"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)
if(gRPC_INSTALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_alts.pdb
DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
)
endif()
endif()

target_include_directories(grpc++_alts
PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(grpc++_alts
${_gRPC_BASELIB_LIBRARIES}
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc++
)

foreach(_hdr
include/grpcpp/alts_context.h
include/grpcpp/impl/codegen/security/auth_context.h
)
string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr}
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
)
endforeach()
endif()

if(gRPC_BUILD_CODEGEN)

if(gRPC_INSTALL)
install(TARGETS grpc++_alts EXPORT gRPCTargets
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()

endif()
if(gRPC_BUILD_TESTS)

if(gRPC_BUILD_CODEGEN)
Expand Down Expand Up @@ -10002,46 +9923,6 @@ endif()
endif()
if(gRPC_BUILD_TESTS)

add_executable(alts_context_test
test/cpp/common/alts_context_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)

target_include_directories(alts_context_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)

target_link_libraries(alts_context_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc++_test_util
grpc_test_util
grpc++_alts
grpc++
grpc
gpr
grpc++_test_config
${_gRPC_GFLAGS_LIBRARIES}
)


endif()
if(gRPC_BUILD_TESTS)

add_executable(alts_counter_test
test/core/tsi/alts/frame_protector/alts_counter_test.cc
third_party/googletest/googletest/src/gtest-all.cc
Expand Down
Loading

0 comments on commit d0578ce

Please sign in to comment.