aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-09-24 10:10:28 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-09-24 10:10:28 -0500
commit06bee964a8989c3dcafdf8e665f74762814b43a2 (patch)
tree23a74b3f5dc698afbf95f79a9817cabed728b0b4 /CMakeLists.txt
parentMerge pull request #5877 (diff)
parentRemoved Berkeley DB and db switching logic (diff)
downloadmonero-06bee964a8989c3dcafdf8e665f74762814b43a2.tar.xz
Merge pull request #5878
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt56
1 files changed, 3 insertions, 53 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d5bf7af62..beb97bfcf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -357,54 +357,9 @@ endif()
# memory was the default in Cryptonote before Monero implemented LMDB, it still works but is unnecessary.
# set(DATABASE memory)
set(DATABASE lmdb)
-
-if (DEFINED ENV{DATABASE})
- set(DATABASE $ENV{DATABASE})
- message(STATUS "DATABASE set: ${DATABASE}")
-else()
- message(STATUS "Could not find DATABASE in env (not required unless you want to change database type from default: ${DATABASE})")
-endif()
-
-set(BERKELEY_DB_OVERRIDE 0)
-if (DEFINED ENV{BERKELEY_DB})
- set(BERKELEY_DB_OVERRIDE 1)
- set(BERKELEY_DB $ENV{BERKELEY_DB})
-elseif()
- set(BERKELEY_DB 0)
-endif()
-
-if (DATABASE STREQUAL "lmdb")
- message(STATUS "Using LMDB as default DB type")
- set(BLOCKCHAIN_DB DB_LMDB)
- add_definitions("-DDEFAULT_DB_TYPE=\"lmdb\"")
-elseif (DATABASE STREQUAL "berkeleydb")
- find_package(BerkeleyDB)
- if(NOT BERKELEY_DB)
- die("Found BerkeleyDB includes, but could not find BerkeleyDB library. Please make sure you have installed libdb and libdb-dev / libdb++-dev or the equivalent.")
- else()
- message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}")
- if(BERKELEY_DB_LIBRARIES)
- message(STATUS "Found BerkeleyDB shared library")
- set(BDB_STATIC false CACHE BOOL "BDB Static flag")
- set(BDB_INCLUDE ${BERKELEY_DB_INCLUDE_DIR} CACHE STRING "BDB include path")
- set(BDB_LIBRARY ${BERKELEY_DB_LIBRARIES} CACHE STRING "BDB library name")
- set(BDB_LIBRARY_DIRS "" CACHE STRING "BDB Library dirs")
- set(BERKELEY_DB 1)
- else()
- die("Found BerkeleyDB includes, but could not find BerkeleyDB library. Please make sure you have installed libdb and libdb-dev / libdb++-dev or the equivalent.")
- endif()
- endif()
-
- message(STATUS "Using Berkeley DB as default DB type")
- add_definitions("-DDEFAULT_DB_TYPE=\"berkeley\"")
-else()
- die("Invalid database type: ${DATABASE}")
-endif()
-
-if(BERKELEY_DB)
- add_definitions("-DBERKELEY_DB")
-endif()
-
+message(STATUS "Using LMDB as default DB type")
+set(BLOCKCHAIN_DB DB_LMDB)
+add_definitions("-DDEFAULT_DB_TYPE=\"lmdb\"")
add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}")
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
@@ -506,11 +461,6 @@ link_directories(${EASYLOGGING_LIBRARY_DIRS})
# Final setup for liblmdb
include_directories(${LMDB_INCLUDE})
-# Final setup for Berkeley DB
-if (BERKELEY_DB)
- include_directories(${BDB_INCLUDE})
-endif()
-
# Final setup for libunwind
include_directories(${LIBUNWIND_INCLUDE})
link_directories(${LIBUNWIND_LIBRARY_DIRS})