Better build of azure blob

This commit is contained in:
Amos Bird 2021-12-19 21:34:24 +08:00
parent 3b8978de36
commit ffda16b5a4
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
2 changed files with 10 additions and 5 deletions

View File

@ -1,8 +1,10 @@
option (ENABLE_AZURE_BLOB_STORAGE "Enable Azure blob storage" ${ENABLE_LIBRARIES})
option(USE_INTERNAL_AZURE_BLOB_STORAGE_LIBRARY option(USE_INTERNAL_AZURE_BLOB_STORAGE_LIBRARY
"Set to FALSE to use system Azure SDK instead of bundled (OFF currently not implemented)" "Set to FALSE to use system Azure SDK instead of bundled (OFF currently not implemented)"
${ENABLE_LIBRARIES}) ON)
if (USE_INTERNAL_AZURE_BLOB_STORAGE_LIBRARY) if (ENABLE_AZURE_BLOB_STORAGE)
set(USE_AZURE_BLOB_STORAGE 1) set(USE_AZURE_BLOB_STORAGE 1)
set(AZURE_BLOB_STORAGE_LIBRARY azure_sdk) set(AZURE_BLOB_STORAGE_LIBRARY azure_sdk)
endif() endif()

View File

@ -46,14 +46,17 @@ include("${AZURE_DIR}/cmake-modules/AzureTransportAdapters.cmake")
add_library(azure_sdk ${AZURE_SDK_UNIFIED_SRC}) add_library(azure_sdk ${AZURE_SDK_UNIFIED_SRC})
if (COMPILER_CLANG) if (COMPILER_CLANG)
target_compile_options(azure_sdk PUBLIC target_compile_options(azure_sdk PRIVATE
-Wno-deprecated-copy-dtor -Wno-deprecated-copy-dtor
-Wno-extra-semi -Wno-extra-semi
-Wno-suggest-destructor-override -Wno-suggest-destructor-override
-Wno-inconsistent-missing-destructor-override -Wno-inconsistent-missing-destructor-override
-Wno-error=unknown-warning-option -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() endif()
# Originally, on Windows azure-core is built with bcrypt and crypt32 by default # Originally, on Windows azure-core is built with bcrypt and crypt32 by default
@ -68,4 +71,4 @@ endif()
target_link_libraries(azure_sdk PRIVATE ${LIBXML2_LIBRARIES}) target_link_libraries(azure_sdk PRIVATE ${LIBXML2_LIBRARIES})
target_include_directories(azure_sdk PUBLIC ${AZURE_SDK_INCLUDES}) target_include_directories(azure_sdk SYSTEM PUBLIC ${AZURE_SDK_INCLUDES})