mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Removed Berkeley DB and db switching logic
This commit is contained in:
parent
98af2e954b
commit
f9b3f6ef3b
21 changed files with 37 additions and 3190 deletions
|
@ -356,54 +356,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
|
||||
|
@ -505,11 +460,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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue