Skip to content

Commit

Permalink
Merge pull request #1 from Bit-Quill/AT-609-enable-timestream-query-a…
Browse files Browse the repository at this point in the history
…nd-write

AT-609 Enable timestream-query and timestream-write in project
  • Loading branch information
jerrytfleung authored Dec 18, 2020
2 parents d31a9d2 + fdd1e54 commit b93280f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build_mac_debug64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# $BITNESS=64

cd src
git clone -b "1.7.329" "https://github.com/aws/aws-sdk-cpp.git"
git clone -b "1.8.108" "https://github.com/aws/aws-sdk-cpp.git"
cd ..

PREFIX_PATH=$(pwd)
mkdir cmake-build64
cd cmake-build64
cmake ../src -DCMAKE_INSTALL_PREFIX=${PREFIX_PATH}/AWSSDK/ -DCMAKE_BUILD_TYPE=Debug -DBUILD_ONLY="core" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_RTTI="OFF" -DENABLE_TESTING="OFF"
cmake ../src -DCMAKE_INSTALL_PREFIX=${PREFIX_PATH}/AWSSDK/ -DCMAKE_BUILD_TYPE=Debug -DBUILD_ONLY="core;timestream-query;timestream-write" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_RTTI="OFF" -DENABLE_TESTING="OFF"
cd ..

cmake --build cmake-build64 -- -j 4
4 changes: 2 additions & 2 deletions build_mac_release64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# $BITNESS=64

cd src
git clone -b "1.7.329" "https://github.com/aws/aws-sdk-cpp.git"
git clone -b "1.8.108" "https://github.com/aws/aws-sdk-cpp.git"
cd ..

PREFIX_PATH=$(pwd)
mkdir cmake-build64
cd cmake-build64
cmake ../src -DCMAKE_INSTALL_PREFIX=${PREFIX_PATH}/AWSSDK/ -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="core" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_RTTI="OFF" -DENABLE_TESTING="OFF"
cmake ../src -DCMAKE_INSTALL_PREFIX=${PREFIX_PATH}/AWSSDK/ -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="core;timestream-query;timestream-write" -DCUSTOM_MEMORY_MANAGEMENT="OFF" -DENABLE_RTTI="OFF" -DENABLE_TESTING="OFF"
cd ..

cmake --build cmake-build64 -- -j 4
4 changes: 2 additions & 2 deletions scripts/build_aws-sdk-cpp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $INSTALL_DIR = $args[4]
Write-Host $args

# Clone the AWS SDK CPP repo
# $SDK_VER = "1.7.29"
# $SDK_VER = "1.8.108"
# -b "$SDK_VER" `
git clone `
--single-branch `
Expand All @@ -23,7 +23,7 @@ cmake $SRC_DIR `
-A $WIN_ARCH `
-D CMAKE_INSTALL_PREFIX=$INSTALL_DIR `
-D CMAKE_BUILD_TYPE=$CONFIGURATION `
-D BUILD_ONLY="core" `
-D BUILD_ONLY="core;timestream-query;timestream-write" `
-D ENABLE_UNITY_BUILD="ON" `
-D CUSTOM_MEMORY_MANAGEMENT="OFF" `
-D ENABLE_RTTI="OFF" `
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,14 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
# Set path for AWS SDK
set(aws-cpp-sdk-base "${CMAKE_CURRENT_SOURCE_DIR}/aws-sdk-cpp")
set(aws-cpp-sdk-core_DIR "${PROJECT_ROOT}/sdk-build${BITNESS}/AWSSDK/lib/cmake/aws-cpp-sdk-core")
set(aws-cpp-sdk-timestream-query_DIR "${PROJECT_ROOT}/sdk-build${BITNESS}/AWSSDK/lib/cmake/aws-cpp-sdk-timestream-query")
set(aws-cpp-sdk-timestream-write_DIR "${PROJECT_ROOT}/sdk-build${BITNESS}/AWSSDK/lib/cmake/aws-cpp-sdk-timestream-write")
set(aws-c-event-stream_DIR "${PROJECT_ROOT}/sdk-build${BITNESS}/AWSSDK/lib/aws-c-event-stream/cmake")
set(aws-c-common_DIR "${PROJECT_ROOT}/sdk-build${BITNESS}/AWSSDK/lib/aws-c-common/cmake")
set(aws-checksums_DIR "${PROJECT_ROOT}/sdk-build${BITNESS}/AWSSDK/lib/aws-checksums/cmake")

if (WIN32)
find_package(AWSSDK REQUIRED core)
find_package(AWSSDK REQUIRED core timestream-query timestream-write)
endif()

# General compiler definitions
Expand Down
6 changes: 3 additions & 3 deletions src/odfesqlodbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ include_directories(
# Platform specific library dependencies
if(WIN32)
# Windows specifiec
target_link_libraries(odfesqlodbc wsock32 ws2_32 winmm user32 gdi32 legacy_stdio_definitions aws-cpp-sdk-core kernel32 advapi32 secur32 XOleHlp Wldap32 crypt32 Normaliz odbccp32 odbc32)
target_link_libraries(odfesqlodbc wsock32 ws2_32 winmm user32 gdi32 legacy_stdio_definitions aws-cpp-sdk-core aws-cpp-sdk-timestream-query aws-cpp-sdk-timestream-write kernel32 advapi32 secur32 XOleHlp Wldap32 crypt32 Normaliz odbccp32 odbc32)
target_link_libraries(odfesqlodbc debug msvcrtd)
target_link_libraries(odfesqlodbc optimized msvcrt)
elseif(APPLE)
# Apple specific
target_link_libraries(odfesqlodbc iodbc iodbcinst aws-cpp-sdk-core)
target_link_libraries(odfesqlodbc iodbc iodbcinst aws-cpp-sdk-core aws-cpp-sdk-timestream-query aws-cpp-sdk-timestream-write)
elseif(UNIX)
# Unix specific
include_directories(/usr/src/linux-headers-5.0.0-27/include)
target_link_libraries(odfesqlodbc aws-cpp-sdk-core odbc odbcinst)
target_link_libraries(odfesqlodbc aws-cpp-sdk-core aws-cpp-sdk-timestream-query aws-cpp-sdk-timestream-write odbc odbcinst)
endif()

0 comments on commit b93280f

Please sign in to comment.