Skip to content

Commit

Permalink
Add support for S3 select API
Browse files Browse the repository at this point in the history
This release adds support via to the S3 select streaming API.
The API is implemented in C99 via libraries that are developed
by AWS as well.

The libraries are downloaded and built as part of the CMake configure
step. That can be disabled via the new switch -DBUILD_DEPS=OFF. The
switch is set to ON by default.
  • Loading branch information
marcomagdy authored and Pushen Wang committed Nov 16, 2018
1 parent 59337ec commit ffd8125
Show file tree
Hide file tree
Showing 73 changed files with 3,663 additions and 199 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ aws-cpp-sdk-core/include/aws/core/SDKConfig.h

#nuget
*.nupkg

#Aws common runtime libs
.aws-common-runtime-libs-build/
.aws-common-runtime-libs-install/
80 changes: 67 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@
# permissions and limitations under the License.
#

cmake_minimum_required (VERSION 2.8.12)
cmake_minimum_required (VERSION 3.1)
if(POLICY CMP0028)
cmake_policy(SET CMP0028 NEW)
endif()
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if(POLICY CMP0056)
cmake_policy(SET CMP0056 NEW)
endif()

# 3.0 or higher is strongly suggested; build settings (target_compile_options/etc...) sometimes do not get propagated properly under certain conditions prior to this version
# Making this a hard requirement is potentially disruptive to existing customers who aren't affected by the bad behavior though, so just warn for now
Expand All @@ -23,7 +35,7 @@ endif()

get_filename_component(AWS_NATIVE_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)

# git is required for Android builds and optional for all other platforms
# git is required for Android builds and building third-party dependencies
find_package(Git)

# Cmake invocation variables:
Expand Down Expand Up @@ -56,6 +68,7 @@ option(ANDROID_BUILD_ZLIB "When building for Android, should Zlib be built as we
option(FORCE_CURL "Forces usage of the Curl client rather than the default OS-specific api" OFF)
option(ENABLE_ADDRESS_SANITIZER "Flags to enable/disable Address Sanitizer for gcc or clang" OFF)
option(BYPASS_DEFAULT_PROXY "Bypass the machine's default proxy settings when using IXmlHttpRequest2" ON)
option(BUILD_DEPS "Build third-party dependencies" ON)


set(BUILD_ONLY "" CACHE STRING "A semi-colon delimited list of the projects to build")
Expand Down Expand Up @@ -93,19 +106,60 @@ endif()

include(initialize_project_version)

if(POLICY CMP0028)
cmake_policy(SET CMP0028 NEW)
endif()
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if(POLICY CMP0056)
cmake_policy(SET CMP0056 NEW)

# build third-party targets
if (BUILD_DEPS)
set(AWS_DEPS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/.deps)
if (DEFINED CMAKE_INSTALL_PREFIX)
set(AWS_DEPS_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
else()
set(AWS_DEPS_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/.deps/install)
endif()
file(MAKE_DIRECTORY ${AWS_DEPS_BUILD_DIR})
if(TARGET_ARCH STREQUAL "ANDROID")
execute_process(
COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
-DTARGET_ARCH=${TARGET_ARCH}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}
-DANDROID_ABI=${ANDROID_ABI}
-DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME}
-DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN}
-DANDROID_STL=${ANDROID_STL}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR}
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/third-party
WORKING_DIRECTORY ${AWS_DEPS_BUILD_DIR})
else()
execute_process(
COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
-DTARGET_ARCH=${TARGET_ARCH}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/bin
${CMAKE_CURRENT_SOURCE_DIR}/third-party
WORKING_DIRECTORY ${AWS_DEPS_BUILD_DIR}
RESULT_VARIABLE BUILD_3P_EXIT_CODE)
endif()

if (NOT ${BUILD_3P_EXIT_CODE} EQUAL 0)
message(FATAL_ERROR "Failed to configure third-party libraries.")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build ${AWS_DEPS_BUILD_DIR} --config ${CMAKE_BUILD_TYPE}
RESULT_VARIABLE BUILD_3P_EXIT_CODE)

if (NOT ${BUILD_3P_EXIT_CODE} EQUAL 0)
message(FATAL_ERROR "Failed to build third-party libraries.")
endif()
message(STATUS "Third-party dependencies are installed at: ${AWS_DEPS_INSTALL_DIR}")
list(APPEND CMAKE_PREFIX_PATH "${AWS_DEPS_INSTALL_DIR}")
endif()

# build the sdk targets
project("aws-cpp-sdk-all" VERSION "${PROJECT_VERSION}" LANGUAGES CXX)

# http client, encryption, zlib
Expand Down
1 change: 0 additions & 1 deletion aws-cpp-sdk-cloudfront-integration-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})

target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS})
copyDlls(${PROJECT_NAME} ${PROJECT_LIBS})
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})

target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS})
copyDlls(${PROJECT_NAME} ${PROJECT_LIBS})
5 changes: 3 additions & 2 deletions aws-cpp-sdk-core-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ file(GLOB AWS_NET_SRC "${CMAKE_CURRENT_SOURCE_DIR}/aws/net/*.cpp")
file(GLOB HTTP_SRC "${CMAKE_CURRENT_SOURCE_DIR}/http/*.cpp")
file(GLOB UTILS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/utils/*.cpp")
file(GLOB UTILS_CRYPTO_SRC "${CMAKE_CURRENT_SOURCE_DIR}/utils/crypto/*.cpp")
file(GLOB UTILS_EVENT_SRC "${CMAKE_CURRENT_SOURCE_DIR}/utils/event/*.cpp")
file(GLOB UTILS_JSON_SRC "${CMAKE_CURRENT_SOURCE_DIR}/utils/json/*.cpp")
file(GLOB UTILS_STREAM_SRC "${CMAKE_CURRENT_SOURCE_DIR}/utils/stream/*.cpp")
file(GLOB UTILS_LOGGING_SRC "${CMAKE_CURRENT_SOURCE_DIR}/utils/logging/*.cpp")
Expand All @@ -35,6 +36,7 @@ file(GLOB AWS_CPP_SDK_CORE_TESTS_SRC
${HTTP_SRC}
${UTILS_SRC}
${UTILS_CRYPTO_SRC}
${UTILS_EVENT_SRC}
${UTILS_JSON_SRC}
${UTILS_STREAM_SRC}
${UTILS_XML_SRC}
Expand All @@ -55,6 +57,7 @@ if(PLATFORM_WINDOWS)
source_group("Source Files\\monitoring" FILES ${MONITORING_SRC})
source_group("Source Files\\utils" FILES ${UTILS_SRC})
source_group("Source Files\\utils\\crypto" FILES ${UTILS_CRYPTO_SRC})
source_group("Source Files\\utils\\event" FILES ${UTILS_EVENT_SRC})
source_group("Source Files\\utils\\json" FILES ${UTILS_JSON_SRC})
source_group("Source Files\\utils\\stream" FILES ${UTILS_STREAM_SRC})
source_group("Source Files\\utils\\xml" FILES ${UTILS_XML_SRC})
Expand Down Expand Up @@ -94,8 +97,6 @@ set_compiler_warnings(${PROJECT_NAME})

target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS})

copyDlls(${PROJECT_NAME} ${PROJECT_LIBS})

add_custom_command(TARGET aws-cpp-sdk-core-tests PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/resources ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
Loading

0 comments on commit ffd8125

Please sign in to comment.