make compact as a plugin interface

This commit is contained in:
Hongze Cheng 2021-03-05 13:25:56 +08:00
parent 04e4e152a9
commit bd8cb52555
2 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,10 @@ AUX_SOURCE_DIRECTORY(src SRC)
ADD_LIBRARY(tsdb ${SRC})
TARGET_LINK_LIBRARIES(tsdb tfs common tutil)
IF (TD_TSDB_PLUGINS)
TARGET_LINK_LIBRARIES(tsdb tsdbPlugins)
ENDIF ()
IF (TD_LINUX)
# Someone has no gtest directory, so comment it
# ADD_SUBDIRECTORY(tests)

View File

@ -14,5 +14,9 @@
*/
#include "tsdb.h"
#ifndef _TSDB_PLUGINS
int tsdbCompact(STsdbRepo *pRepo) { return 0; }
void *tsdbCompactImpl(STsdbRepo *pRepo) { return NULL; }
void *tsdbCompactImpl(STsdbRepo *pRepo) { return NULL; }
#endif