From c57e586052ad174fae29b8fcc5d28a6a5d415c0b Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 1 Dec 2021 13:10:26 +0800 Subject: [PATCH] integrate BDB --- CMakeLists.txt | 5 +++++ cmake/bdb_CMakeLists.txt.in | 13 +++++++++++++ cmake/cmake.options | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 cmake/bdb_CMakeLists.txt.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 46f0517fdc..6e47b8c24a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,11 @@ if(${BUILD_WITH_ROCKSDB}) add_definitions(-DUSE_ROCKSDB) endif(${BUILD_WITH_ROCKSDB}) +## bdb +if(${BUILD_WITH_BDB}) + cat("${CMAKE_SUPPORT_DIR}/bdb_CMakeLists.txt.in" ${DEPS_TMP_FILE}) +endif(${BUILD_WITH_DBD}) + ## lucene if(${BUILD_WITH_LUCENE}) cat("${CMAKE_SUPPORT_DIR}/lucene_CMakeLists.txt.in" ${DEPS_TMP_FILE}) diff --git a/cmake/bdb_CMakeLists.txt.in b/cmake/bdb_CMakeLists.txt.in new file mode 100644 index 0000000000..102863006c --- /dev/null +++ b/cmake/bdb_CMakeLists.txt.in @@ -0,0 +1,13 @@ + +# bdb +ExternalProject_Add(bdb + GIT_REPOSITORY https://github.com/berkeleydb/libdb.git + GIT_TAG v5.3.28 + SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/bdb" + BINARY_DIR "${CMAKE_SOURCE_DIR}/deps/bdb" + #BUILD_IN_SOURCE TRUE + CONFIGURE_COMMAND "./dist/configure" + BUILD_COMMAND "make" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/cmake/cmake.options b/cmake/cmake.options index 97fd1781e0..0a92d693e6 100644 --- a/cmake/cmake.options +++ b/cmake/cmake.options @@ -19,6 +19,12 @@ option( ON ) +option( + BUILD_WITH_BDB + "If build with BerkleyDB" + ON +) + option( BUILD_WITH_LUCENE "If build with lucene"