diff --git a/dbms/CMakeLists.txt b/dbms/CMakeLists.txt index f18608f3256..bcb44b468d8 100644 --- a/dbms/CMakeLists.txt +++ b/dbms/CMakeLists.txt @@ -235,10 +235,6 @@ target_link_libraries(clickhouse_common_io roaring ) -if(ZSTD_LIBRARY) - target_link_libraries(clickhouse_common_io PUBLIC ${ZSTD_LIBRARY}) -endif() - if (USE_RDKAFKA) target_link_libraries(dbms PRIVATE ${CPPKAFKA_LIBRARY} ${RDKAFKA_LIBRARY}) if(NOT USE_INTERNAL_RDKAFKA_LIBRARY) @@ -294,11 +290,14 @@ target_include_directories(dbms SYSTEM PUBLIC ${PCG_RANDOM_INCLUDE_DIR}) if (NOT USE_INTERNAL_LZ4_LIBRARY) target_include_directories(dbms SYSTEM BEFORE PRIVATE ${LZ4_INCLUDE_DIR}) endif () + +if(ZSTD_LIBRARY) + target_link_libraries(dbms PRIVATE ${ZSTD_LIBRARY}) +endif() if (NOT USE_INTERNAL_ZSTD_LIBRARY AND ZSTD_INCLUDE_DIR) target_include_directories(dbms SYSTEM BEFORE PRIVATE ${ZSTD_INCLUDE_DIR}) endif () - if (NOT USE_INTERNAL_BOOST_LIBRARY) target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) endif () diff --git a/dbms/src/Compression/CompressedReadBufferBase.cpp b/dbms/src/Compression/CompressedReadBufferBase.cpp index bd2078175dc..9f3664b4c9f 100644 --- a/dbms/src/Compression/CompressedReadBufferBase.cpp +++ b/dbms/src/Compression/CompressedReadBufferBase.cpp @@ -1,11 +1,8 @@ #include "CompressedReadBufferBase.h" #include - #include #include -#include - #include #include #include diff --git a/dbms/src/Compression/CompressedWriteBuffer.cpp b/dbms/src/Compression/CompressedWriteBuffer.cpp index 1285949c863..9dd3c23100f 100644 --- a/dbms/src/Compression/CompressedWriteBuffer.cpp +++ b/dbms/src/Compression/CompressedWriteBuffer.cpp @@ -1,8 +1,5 @@ #include #include -#include -#include -#include #include #include diff --git a/dbms/src/Compression/ICompressionCodec.cpp b/dbms/src/Compression/ICompressionCodec.cpp index ddedf8a4c9c..a50001238da 100644 --- a/dbms/src/Compression/ICompressionCodec.cpp +++ b/dbms/src/Compression/ICompressionCodec.cpp @@ -7,7 +7,6 @@ #include #include #include -#include namespace ProfileEvents {