mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
Remove unbundled libprotobuf-mutator support
This commit is contained in:
parent
aef6668cb4
commit
6c0fa21025
@ -528,7 +528,6 @@ include (cmake/find/msgpack.cmake)
|
||||
include (cmake/find/cassandra.cmake)
|
||||
include (cmake/find/sentry.cmake)
|
||||
include (cmake/find/datasketches.cmake)
|
||||
include (cmake/find/libprotobuf-mutator.cmake)
|
||||
|
||||
set (USE_INTERNAL_CITYHASH_LIBRARY ON CACHE INTERNAL "")
|
||||
find_contrib_lib(cityhash)
|
||||
|
@ -1,11 +0,0 @@
|
||||
option(USE_LIBPROTOBUF_MUTATOR "Enable libprotobuf-mutator" ${ENABLE_FUZZING})
|
||||
|
||||
if (NOT USE_LIBPROTOBUF_MUTATOR)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(LibProtobufMutator_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libprotobuf-mutator")
|
||||
|
||||
if (NOT EXISTS "${LibProtobufMutator_SOURCE_DIR}/README.md")
|
||||
message (ERROR "submodule contrib/libprotobuf-mutator is missing. to fix try run: \n git submodule update --init")
|
||||
endif()
|
8
contrib/CMakeLists.txt
vendored
8
contrib/CMakeLists.txt
vendored
@ -42,10 +42,6 @@ if (USE_INTERNAL_CAPNP_LIBRARY AND NOT MISSING_INTERNAL_CAPNP_LIBRARY)
|
||||
add_subdirectory(capnproto-cmake)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_FUZZING)
|
||||
add_subdirectory (libprotobuf-mutator-cmake)
|
||||
endif()
|
||||
|
||||
if (USE_YAML_CPP)
|
||||
add_subdirectory (yaml-cpp-cmake)
|
||||
endif()
|
||||
@ -74,6 +70,10 @@ add_subdirectory (grpc-cmake)
|
||||
add_subdirectory (protobuf-cmake)
|
||||
add_subdirectory (libhdfs3-cmake) # requires: protobuf
|
||||
|
||||
if (ENABLE_FUZZING)
|
||||
add_subdirectory (libprotobuf-mutator-cmake)
|
||||
endif()
|
||||
|
||||
# TODO: refactor the contrib libraries below this comment.
|
||||
|
||||
if (USE_INTERNAL_RE2_LIBRARY)
|
||||
|
@ -1,6 +1,12 @@
|
||||
option(USE_LIBPROTOBUF_MUTATOR "Enable libprotobuf-mutator" ${ENABLE_FUZZING})
|
||||
|
||||
if (NOT USE_LIBPROTOBUF_MUTATOR)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/libprotobuf-mutator)
|
||||
|
||||
add_library(protobuf-mutator
|
||||
add_library(_protobuf-mutator
|
||||
${LIBRARY_DIR}/src/libfuzzer/libfuzzer_macro.cc
|
||||
${LIBRARY_DIR}/src/libfuzzer/libfuzzer_mutator.cc
|
||||
${LIBRARY_DIR}/src/binary_format.cc
|
||||
@ -8,7 +14,9 @@ add_library(protobuf-mutator
|
||||
${LIBRARY_DIR}/src/text_format.cc
|
||||
${LIBRARY_DIR}/src/utf8_fix.cc)
|
||||
|
||||
target_include_directories(protobuf-mutator BEFORE PRIVATE "${LIBRARY_DIR}")
|
||||
target_include_directories(protobuf-mutator BEFORE PRIVATE "${ClickHouse_SOURCE_DIR}/contrib/protobuf/src")
|
||||
target_include_directories(_protobuf-mutator BEFORE INTERFACE "${LIBRARY_DIR}")
|
||||
target_include_directories(_protobuf-mutator BEFORE INTERFACE "${ClickHouse_SOURCE_DIR}/contrib/protobuf/src")
|
||||
|
||||
target_link_libraries(protobuf-mutator ch_contrib::protobuf)
|
||||
target_link_libraries(_protobuf-mutator ch_contrib::protobuf)
|
||||
|
||||
add_library(ch_contrib::protobuf_mutator ALIAS _protobuf-mutator)
|
||||
|
@ -41,6 +41,4 @@ add_executable(codegen_select_fuzzer ${FUZZER_SRCS})
|
||||
set_source_files_properties("${PROTO_SRCS}" "out.cpp" PROPERTIES COMPILE_FLAGS "-Wno-reserved-identifier")
|
||||
|
||||
target_include_directories(codegen_select_fuzzer SYSTEM BEFORE PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
target_include_directories(codegen_select_fuzzer SYSTEM BEFORE PRIVATE "${LibProtobufMutator_SOURCE_DIR}")
|
||||
target_include_directories(codegen_select_fuzzer SYSTEM BEFORE PRIVATE "${LibProtobufMutator_SOURCE_DIR}/src")
|
||||
target_link_libraries(codegen_select_fuzzer PRIVATE protobuf-mutator ch_contrib::protoc dbms ${LIB_FUZZING_ENGINE})
|
||||
target_link_libraries(codegen_select_fuzzer PRIVATE ch_contrib::protobuf_mutator ch_contrib::protoc dbms ${LIB_FUZZING_ENGINE})
|
||||
|
Loading…
Reference in New Issue
Block a user