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 udi-speedb committed Oct 31, 2023
1 parent c2746f8 commit 7ce9144
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 @@ -959,12 +959,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 @@ -242,6 +242,10 @@ am__v_AR_1 =
AM_LINK = $(AM_V_CCLD)$(CXX) -L. $(patsubst lib%.a, -l%, $(patsubst lib%.$(PLATFORM_SHARED_EXT), -l%, $^)) $(EXEC_LDFLAGS) -o $@ $(LDFLAGS) $(COVERAGEFLAGS)
AM_SHARE = $(AM_V_CCLD) $(CXX) $(PLATFORM_SHARED_LDFLAGS)$@ -L. $(patsubst lib%.$(PLATFORM_SHARED_EXT), -l%, $^) $(EXEC_LDFLAGS) $(LDFLAGS) -o $@

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 7ce9144

Please sign in to comment.