From 26bd78ad687834d5434cecaab03d830688a206b7 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Sat, 3 Jun 2023 10:30:21 +0800 Subject: [PATCH] Workaround protoc's issue(https://github.com/protocolbuffers/protobuf/issues/9378). --- cpp-ch/local-engine/CMakeLists.txt | 7 ++++--- cpp-ch/local-engine/proto/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cpp-ch/local-engine/CMakeLists.txt b/cpp-ch/local-engine/CMakeLists.txt index b55e2c4ecb4c..a26b87bb79fa 100644 --- a/cpp-ch/local-engine/CMakeLists.txt +++ b/cpp-ch/local-engine/CMakeLists.txt @@ -82,17 +82,18 @@ add_library(${LOCALENGINE_SHARED_LIB} SHARED target_compile_options(${LOCALENGINE_SHARED_LIB} PUBLIC -fPIC -Wno-shorten-64-to-32) -target_link_libraries(${LOCALENGINE_SHARED_LIB} PUBLIC - +target_link_libraries(${LOCALENGINE_SHARED_LIB} +PUBLIC clickhouse_new_delete clickhouse_common_config clickhouse_common_io clickhouse_parsers clickhouse_storages_system - substrait loggers gluten_clickhouse_backend_libs ch_contrib::protobuf +PRIVATE + substrait ) if (ENABLE_LOCAL_FORMATS) diff --git a/cpp-ch/local-engine/proto/CMakeLists.txt b/cpp-ch/local-engine/proto/CMakeLists.txt index 055a464c7c67..9a52737e7a7b 100644 --- a/cpp-ch/local-engine/proto/CMakeLists.txt +++ b/cpp-ch/local-engine/proto/CMakeLists.txt @@ -21,7 +21,7 @@ set_source_files_properties(${SUBSTRAIT_SRCS} PROPERTIES GENERATED TRUE) add_library(substrait ${SUBSTRAIT_SRCS}) add_dependencies(substrait generate_substrait) -target_compile_options(substrait PUBLIC -fPIC -Wno-reserved-identifier -Wno-deprecated) +target_compile_options(substrait PUBLIC -fPIC -Wno-reserved-identifier -Wno-deprecated -Wno-shadow-field) target_include_directories(substrait SYSTEM BEFORE PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(substrait ch_contrib::protobuf)