mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Remove unbundled aws-s3 support
This commit is contained in:
parent
50d38c670e
commit
cad885ab1c
@ -487,7 +487,6 @@ message (STATUS
|
|||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
|
|
||||||
include (cmake/find/llvm.cmake)
|
include (cmake/find/llvm.cmake)
|
||||||
include (cmake/find/s3.cmake)
|
|
||||||
include (cmake/find/nlp.cmake)
|
include (cmake/find/nlp.cmake)
|
||||||
|
|
||||||
# Need to process before "contrib" dir:
|
# Need to process before "contrib" dir:
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
if(NOT OS_FREEBSD)
|
|
||||||
option(ENABLE_S3 "Enable S3" ${ENABLE_LIBRARIES})
|
|
||||||
elseif(ENABLE_S3 OR USE_INTERNAL_AWS_S3_LIBRARY)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use S3 on FreeBSD")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT ENABLE_S3)
|
|
||||||
if(USE_INTERNAL_AWS_S3_LIBRARY)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal S3 library with ENABLE_S3=OFF")
|
|
||||||
endif()
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option(USE_INTERNAL_AWS_S3_LIBRARY "Set to FALSE to use system S3 instead of bundled (experimental set to OFF on your own risk)"
|
|
||||||
ON)
|
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_AWS_S3_LIBRARY)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Compilation with external S3 library is not supported yet")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3")
|
|
||||||
message (WARNING "submodule contrib/aws is missing. to fix try run: \n git submodule update --init")
|
|
||||||
if (USE_INTERNAL_AWS_S3_LIBRARY)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal S3 library")
|
|
||||||
endif ()
|
|
||||||
set (MISSING_AWS_S3 1)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (USE_INTERNAL_AWS_S3_LIBRARY AND NOT MISSING_AWS_S3)
|
|
||||||
set(AWS_S3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3/include")
|
|
||||||
set(AWS_S3_CORE_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-core/include")
|
|
||||||
set(AWS_S3_LIBRARY aws_s3)
|
|
||||||
set(USE_INTERNAL_AWS_S3_LIBRARY 1)
|
|
||||||
set(USE_AWS_S3 1)
|
|
||||||
else()
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable S3")
|
|
||||||
set(USE_INTERNAL_AWS_S3_LIBRARY 0)
|
|
||||||
set(USE_AWS_S3 0)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
message (STATUS "Using aws_s3=${USE_AWS_S3}: ${AWS_S3_INCLUDE_DIR} : ${AWS_S3_LIBRARY}")
|
|
15
contrib/CMakeLists.txt
vendored
15
contrib/CMakeLists.txt
vendored
@ -110,18 +110,9 @@ if (USE_EMBEDDED_COMPILER)
|
|||||||
add_llvm()
|
add_llvm()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_subdirectory(libgsasl-cmake)
|
add_subdirectory (libgsasl-cmake)
|
||||||
add_subdirectory(libxml2-cmake)
|
add_subdirectory (libxml2-cmake)
|
||||||
|
add_subdirectory (aws-s3-cmake)
|
||||||
if (USE_INTERNAL_AWS_S3_LIBRARY)
|
|
||||||
add_subdirectory(aws-s3-cmake)
|
|
||||||
|
|
||||||
# The library is large - avoid bloat.
|
|
||||||
target_compile_options (aws_s3 PRIVATE -g0)
|
|
||||||
target_compile_options (aws_s3_checksums PRIVATE -g0)
|
|
||||||
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_subdirectory (base64-cmake)
|
add_subdirectory (base64-cmake)
|
||||||
add_subdirectory (simdjson-cmake)
|
add_subdirectory (simdjson-cmake)
|
||||||
add_subdirectory (rapidjson-cmake)
|
add_subdirectory (rapidjson-cmake)
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
if(NOT OS_FREEBSD)
|
||||||
|
option(ENABLE_S3 "Enable S3" ${ENABLE_LIBRARIES})
|
||||||
|
elseif(ENABLE_S3)
|
||||||
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use S3 on FreeBSD")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ENABLE_S3)
|
||||||
|
message(STATUS "Not using S3")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
SET(AWS_S3_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3")
|
SET(AWS_S3_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3")
|
||||||
SET(AWS_CORE_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-core")
|
SET(AWS_CORE_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-core")
|
||||||
SET(AWS_CHECKSUMS_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws-checksums")
|
SET(AWS_CHECKSUMS_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws-checksums")
|
||||||
@ -93,7 +104,7 @@ add_library(aws_s3 ${S3_UNIFIED_SRC})
|
|||||||
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_MAJOR=1")
|
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_MAJOR=1")
|
||||||
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_MINOR=7")
|
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_MINOR=7")
|
||||||
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_PATCH=231")
|
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_PATCH=231")
|
||||||
target_include_directories(aws_s3 SYSTEM PUBLIC ${S3_INCLUDES})
|
target_include_directories(aws_s3 SYSTEM BEFORE PUBLIC ${S3_INCLUDES})
|
||||||
|
|
||||||
if (TARGET OpenSSL::SSL)
|
if (TARGET OpenSSL::SSL)
|
||||||
target_compile_definitions(aws_s3 PUBLIC -DENABLE_OPENSSL_ENCRYPTION)
|
target_compile_definitions(aws_s3 PUBLIC -DENABLE_OPENSSL_ENCRYPTION)
|
||||||
@ -101,3 +112,9 @@ if (TARGET OpenSSL::SSL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(aws_s3 PRIVATE aws_s3_checksums)
|
target_link_libraries(aws_s3 PRIVATE aws_s3_checksums)
|
||||||
|
|
||||||
|
# The library is large - avoid bloat.
|
||||||
|
target_compile_options (aws_s3 PRIVATE -g0)
|
||||||
|
target_compile_options (aws_s3_checksums PRIVATE -g0)
|
||||||
|
|
||||||
|
add_library(ch_contrib::aws_s3 ALIAS aws_s3)
|
||||||
|
@ -105,7 +105,7 @@ if (TARGET ch_contrib::rocksdb)
|
|||||||
add_headers_and_sources(dbms Storages/RocksDB)
|
add_headers_and_sources(dbms Storages/RocksDB)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_AWS_S3)
|
if (TARGET ch_contrib::aws_s3)
|
||||||
add_headers_and_sources(dbms Common/S3)
|
add_headers_and_sources(dbms Common/S3)
|
||||||
add_headers_and_sources(dbms Disks/S3)
|
add_headers_and_sources(dbms Disks/S3)
|
||||||
endif()
|
endif()
|
||||||
@ -436,10 +436,8 @@ if (TARGET ch_contrib::hivemetastore)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (USE_AWS_S3)
|
if (TARGET ch_contrib::aws_s3)
|
||||||
target_link_libraries (clickhouse_common_io PUBLIC ${AWS_S3_LIBRARY})
|
target_link_libraries (clickhouse_common_io PUBLIC ch_contrib::aws_s3)
|
||||||
target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${AWS_S3_CORE_INCLUDE_DIR})
|
|
||||||
target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${AWS_S3_INCLUDE_DIR})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TARGET ch_contrib::azure_sdk)
|
if (TARGET ch_contrib::azure_sdk)
|
||||||
|
@ -70,3 +70,6 @@ endif()
|
|||||||
if (TARGET ch_contrib::datasketches)
|
if (TARGET ch_contrib::datasketches)
|
||||||
set(USE_DATASKETCHES 1)
|
set(USE_DATASKETCHES 1)
|
||||||
endif()
|
endif()
|
||||||
|
if (TARGET ch_contrib::aws_s3)
|
||||||
|
set(USE_AWS_S3 1)
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user