build fix

This commit is contained in:
Amos Bird 2021-12-15 16:55:18 +08:00
parent 3bdce566a3
commit 9c9f4a3e6c
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
7 changed files with 107 additions and 2 deletions

View File

@ -46,14 +46,17 @@ include("${AZURE_DIR}/cmake-modules/AzureTransportAdapters.cmake")
add_library(azure_sdk ${AZURE_SDK_UNIFIED_SRC})
if (COMPILER_CLANG)
target_compile_options(azure_sdk PUBLIC
target_compile_options(azure_sdk PRIVATE
-Wno-deprecated-copy-dtor
-Wno-extra-semi
-Wno-suggest-destructor-override
-Wno-inconsistent-missing-destructor-override
-Wno-error=unknown-warning-option
-Wno-reserved-identifier
)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
target_compile_options(azure_sdk PRIVATE -Wno-reserved-identifier)
endif()
endif()
# Originally, on Windows azure-core is built with bcrypt and crypt32 by default

View File

@ -385,6 +385,20 @@ dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${PDQSORT_INCLUDE_DIR})
target_include_directories(clickhouse_common_io BEFORE PUBLIC ${MINISELECT_INCLUDE_DIR})
dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${MINISELECT_INCLUDE_DIR})
macro (add_check_flag_definitions flag modules)
if (${flag})
if (MAKE_STATIC_LIBRARIES OR NOT SPLIT_SHARED_LIBRARIES)
target_compile_definitions(clickhouse_common_io PRIVATE ${flag})
target_compile_definitions(dbms PRIVATE ${flag})
else ()
foreach (module ${modules})
target_compile_definitions(${module} PRIVATE ${flag})
endforeach ()
endif ()
endif ()
endmacro ()
add_check_flag_definitions(HAS_SUGGEST_DESTRUCTOR_OVERRIDE "clickhouse_common_io;clickhouse_disks")
if (ZSTD_LIBRARY)
dbms_target_link_libraries(PRIVATE ${ZSTD_LIBRARY})
target_link_libraries (clickhouse_common_io PUBLIC ${ZSTD_LIBRARY})

View File

@ -7,8 +7,26 @@
#if USE_AZURE_BLOB_STORAGE
#include <Disks/IDiskRemote.h>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
# pragma clang diagnostic ignored "-Wdeprecated-copy-dtor"
# pragma clang diagnostic ignored "-Wextra-semi"
# ifdef HAS_SUGGEST_DESTRUCTOR_OVERRIDE
# pragma clang diagnostic ignored "-Wsuggest-destructor-override"
# endif
# ifdef HAS_RESERVED_IDENTIFIER
# pragma clang diagnostic ignored "-Wreserved-identifier"
# endif
#endif
#include <azure/storage/blobs.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace DB
{

View File

@ -11,9 +11,25 @@
#include <IO/WriteBufferFromBlobStorage.h>
#include <IO/SeekAvoidingReadBuffer.h>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
# pragma clang diagnostic ignored "-Wdeprecated-copy-dtor"
# pragma clang diagnostic ignored "-Wextra-semi"
# ifdef HAS_SUGGEST_DESTRUCTOR_OVERRIDE
# pragma clang diagnostic ignored "-Wsuggest-destructor-override"
# endif
# ifdef HAS_RESERVED_IDENTIFIER
# pragma clang diagnostic ignored "-Wreserved-identifier"
# endif
#endif
#include <azure/identity/managed_identity_credential.hpp>
#include <azure/storage/blobs.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace DB
{

View File

@ -6,7 +6,26 @@
#include <IO/ReadSettings.h>
#if USE_AZURE_BLOB_STORAGE
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
# pragma clang diagnostic ignored "-Wdeprecated-copy-dtor"
# pragma clang diagnostic ignored "-Wextra-semi"
# ifdef HAS_SUGGEST_DESTRUCTOR_OVERRIDE
# pragma clang diagnostic ignored "-Wsuggest-destructor-override"
# endif
# ifdef HAS_RESERVED_IDENTIFIER
# pragma clang diagnostic ignored "-Wreserved-identifier"
# endif
#endif
#include <azure/storage/blobs.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#endif
namespace Aws

View File

@ -9,8 +9,26 @@
#include <IO/HTTPCommon.h>
#include <IO/SeekableReadBuffer.h>
#include <IO/ReadSettings.h>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
# pragma clang diagnostic ignored "-Wdeprecated-copy-dtor"
# pragma clang diagnostic ignored "-Wextra-semi"
# ifdef HAS_SUGGEST_DESTRUCTOR_OVERRIDE
# pragma clang diagnostic ignored "-Wsuggest-destructor-override"
# endif
# ifdef HAS_RESERVED_IDENTIFIER
# pragma clang diagnostic ignored "-Wreserved-identifier"
# endif
#endif
#include <azure/storage/blobs.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace DB
{

View File

@ -10,9 +10,26 @@
#include <IO/BufferWithOwnMemory.h>
#include <IO/WriteBuffer.h>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-destructor-override"
# pragma clang diagnostic ignored "-Wdeprecated-copy-dtor"
# pragma clang diagnostic ignored "-Wextra-semi"
# ifdef HAS_SUGGEST_DESTRUCTOR_OVERRIDE
# pragma clang diagnostic ignored "-Wsuggest-destructor-override"
# endif
# ifdef HAS_RESERVED_IDENTIFIER
# pragma clang diagnostic ignored "-Wreserved-identifier"
# endif
#endif
#include <azure/storage/blobs.hpp>
#include <azure/core/io/body_stream.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace DB
{