Skip to content

Commit 261f3ae

Browse files
committed
fix(build): define HAS_TOPLING_CSPP_MEMTABLE when WITH_CSPP_MEMTABLE=1
Avoid depending on cspp_memtable.cc already being present at Makefile parse time, so memtablerep_bench gets the cspp: path even when the sideplugin is cloned later during the build.
1 parent 424dfbe commit 261f3ae

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎Makefile‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,14 @@ ifeq (${WITH_CSPP_MEMTABLE}${WITH_TOPLING_ROCKS},10)
503503
$(error "When WITH_CSPP_MEMTABLE is 1, WITH_TOPLING_ROCKS must be 1 also")
504504
endif
505505

506+
ifeq (${WITH_CSPP_MEMTABLE},1)
507+
CXXFLAGS += -DHAS_TOPLING_CSPP_MEMTABLE
508+
endif
509+
506510
ifneq (,$(wildcard sideplugin/cspp-memtable/cspp_memtable.cc))
507511
ifeq (${WITH_CSPP_MEMTABLE},0)
508512
$(warning cspp-memtable exists but intentional disabled)
509513
else
510-
# now we have cspp-memtable
511-
CXXFLAGS += -DHAS_TOPLING_CSPP_MEMTABLE
512514
CSPP_MEMTABLE_GIT_VER_SRC = ${BUILD_ROOT}/git-version-cspp_memtable.cc
513515
ifeq (,${TOPLING_ZIP_TABLE_TRIAL_DAYS})
514516
EXTRA_LIB_SOURCES += sideplugin/cspp-memtable/cspp_memtable.cc \

0 commit comments

Comments
 (0)