Skip to content

Commit 5bee117

Browse files
authored
Merge pull request #117 from rockset/CMake
Add building of Cloud files to CMake
2 parents 30cd958 + 269400f commit 5bee117

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ option(WITH_SNAPPY "build with SNAPPY" OFF)
6666
option(WITH_LZ4 "build with lz4" OFF)
6767
option(WITH_ZLIB "build with zlib" OFF)
6868
option(WITH_ZSTD "build with zstd" OFF)
69+
option(WITH_AWS "build with AWS" OFF)
6970
option(WITH_WINDOWS_UTF8_FILENAMES "use UTF8 as characterset for opening files, regardles of the system code page" OFF)
7071
if (WITH_WINDOWS_UTF8_FILENAMES)
7172
add_definitions(-DROCKSDB_WINDOWS_UTF8_FILENAMES)
@@ -170,6 +171,13 @@ else()
170171
endif()
171172
endif()
172173

174+
if(WITH_AWS)
175+
find_package(AWSSDK REQUIRED COMPONENTS s3 transfer kinesis)
176+
add_definitions(-DUSE_AWS)
177+
include_directories(${AWS_INCLUDE_DIR})
178+
list(APPEND THIRDPARTY_LIBS ${AWSSDK_LINK_LIBRARIES})
179+
endif()
180+
173181
string(TIMESTAMP TS "%Y/%m/%d %H:%M:%S" UTC)
174182
set(GIT_DATE_TIME "${TS}" CACHE STRING "the time we first built rocksdb")
175183

@@ -827,6 +835,22 @@ set(SOURCES
827835
utilities/ttl/db_ttl_impl.cc
828836
utilities/write_batch_with_index/write_batch_with_index.cc
829837
utilities/write_batch_with_index/write_batch_with_index_internal.cc
838+
cloud/aws/aws_env.cc
839+
cloud/aws/aws_kafka.cc
840+
cloud/aws/aws_kinesis.cc
841+
cloud/aws/aws_retry.cc
842+
cloud/aws/aws_s3.cc
843+
cloud/db_cloud_impl.cc
844+
cloud/cloud_env.cc
845+
cloud/cloud_env_impl.cc
846+
cloud/cloud_env_options.cc
847+
cloud/cloud_log_controller.cc
848+
cloud/manifest_reader.cc
849+
cloud/purge.cc
850+
cloud/cloud_manifest.cc
851+
cloud/cloud_scheduler.cc
852+
cloud/cloud_storage_provider.cc
853+
db/db_impl/db_impl_remote_compaction.cc
830854
$<TARGET_OBJECTS:build_version>)
831855

832856
if(HAVE_SSE42 AND NOT MSVC)
@@ -1042,6 +1066,10 @@ if(WITH_TESTS)
10421066
list(APPEND TESTS
10431067
cache/cache_test.cc
10441068
cache/lru_cache_test.cc
1069+
cloud/db_cloud_test.cc
1070+
cloud/cloud_manifest_test.cc
1071+
cloud/cloud_scheduler_test.cc
1072+
cloud/remote_compaction_test.cc
10451073
db/blob/blob_file_addition_test.cc
10461074
db/blob/blob_file_builder_test.cc
10471075
db/blob/blob_file_garbage_test.cc

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ block_cache_trace_analyzer: $(OBJ_DIR)/tools/block_cache_analyzer/block_cache_tr
13511351
$(AM_LINK)
13521352

13531353
ifeq ($(USE_FOLLY_DISTRIBUTED_MUTEX),1)
1354-
folly_synchronization_distributed_mutex ioooooook_test: $(OBJ_DIR)/third-party/folly/folly/synchronization/test/DistributedMutexTest.o $(TEST_LIBRARY) $(LIBRARY)
1354+
folly_synchronization_distributed_mutex_test: $(OBJ_DIR)/third-party/folly/folly/synchronization/test/DistributedMutexTest.o $(TEST_LIBRARY) $(LIBRARY)
13551355
$(AM_LINK)
13561356
endif
13571357

0 commit comments

Comments
 (0)