diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/jaegertracing/thrift/test/c_glib/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/thrift/test/c_glib/CMakeLists.txt')
-rw-r--r-- | src/jaegertracing/thrift/test/c_glib/CMakeLists.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/jaegertracing/thrift/test/c_glib/CMakeLists.txt b/src/jaegertracing/thrift/test/c_glib/CMakeLists.txt new file mode 100644 index 000000000..98173155b --- /dev/null +++ b/src/jaegertracing/thrift/test/c_glib/CMakeLists.txt @@ -0,0 +1,55 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Contains the thrift specific LINK_AGAINST_THRIFT_LIBRARY +include(ThriftMacros) + +find_package(GLIB REQUIRED COMPONENTS gobject) +include_directories(SYSTEM "${GLIB_INCLUDE_DIR}") +include_directories(SYSTEM "${GLIBCONFIG_INCLUDE_DIR}") + +#Make sure gen-c_glib files can be included +include_directories("${CMAKE_CURRENT_BINARY_DIR}") +include_directories("${CMAKE_CURRENT_BINARY_DIR}/gen-c_glib") +include_directories("${PROJECT_SOURCE_DIR}/lib/c_glib/src") + +set(crosstestgencglib_SOURCES + gen-c_glib/t_test_second_service.c + gen-c_glib/t_test_second_service.h + gen-c_glib/t_test_thrift_test.c + gen-c_glib/t_test_thrift_test.h + gen-c_glib/t_test_thrift_test_types.c + gen-c_glib/t_test_thrift_test_types.h +) +add_library(crosstestgencglib STATIC ${crosstestgencglib_SOURCES}) +LINK_AGAINST_THRIFT_LIBRARY(crosstestgencglib thrift_c_glib) + +add_executable(test_server src/test_server.c src/thrift_test_handler.c src/thrift_second_service_handler.c) +target_link_libraries(test_server crosstestgencglib) + +add_executable(test_client src/test_client.c) +target_link_libraries(test_client crosstestgencglib) + +# +# Common thrift code generation rules +# + +add_custom_command(OUTPUT gen-c_glib/t_test_second_service.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_thrift_test_types.h + COMMAND ${THRIFT_COMPILER} --gen c_glib -r ${PROJECT_SOURCE_DIR}/test/ThriftTest.thrift +) |