Skip to content

Commit

Permalink
build: always add the Speedb plugin to the build (#87)
Browse files Browse the repository at this point in the history
This allows us to make sure that our additions are included
in the build even if the user forgot to set `ROCKSDB_PLUGINS`
explicitly.
  • Loading branch information
isaac-io authored and Yuval-Ariel committed Nov 23, 2022
1 parent ff885a5 commit 5053c11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -976,12 +976,17 @@ list(APPEND SOURCES
utilities/transactions/lock/range/range_tree/lib/util/dbt.cc
utilities/transactions/lock/range/range_tree/lib/util/memarena.cc)

if (ROCKSDB_PLUGINS)
separate_arguments(ROCKSDB_PLUGINS)
endif()
if (NOT ROCKSDB_PLUGINS OR NOT "speedb" IN_LIST ROCKSDB_PLUGINS)
list(APPEND ROCKSDB_PLUGINS speedb)
endif()
set(ROCKSDB_PLUGIN_EXTERNS "")
set(ROCKSDB_PLUGIN_BUILTINS "")
message(STATUS "ROCKSDB_PLUGINS: ${ROCKSDB_PLUGINS}")
if ( ROCKSDB_PLUGINS )
string(REPLACE " " ";" PLUGINS ${ROCKSDB_PLUGINS})
foreach (plugin ${PLUGINS})
if( ROCKSDB_PLUGINS )
foreach (plugin ${ROCKSDB_PLUGINS})
set(plugin_root "plugin/${plugin}/")
add_subdirectory(${plugin_root})
# Use get_directory_property() to avoid having to declare the variables
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)"; \
# this file is generated by the previous line to set build flags and sources
include make_config.mk

ifeq ($(strip $(filter speedb,$(ROCKSDB_PLUGINS))),)
ROCKSDB_PLUGINS += speedb
endif

ROCKSDB_PLUGIN_MKS = $(foreach plugin, $(ROCKSDB_PLUGINS), plugin/$(plugin)/*.mk)
include $(ROCKSDB_PLUGIN_MKS)
ROCKSDB_PLUGIN_PROTO =ROCKSDB_NAMESPACE::ObjectLibrary\&, const std::string\&
Expand Down

0 comments on commit 5053c11

Please sign in to comment.