aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorwarptangent <warptangent@tutanota.com>2016-02-01 03:11:13 -0800
committerwarptangent <warptangent@tutanota.com>2016-02-01 13:06:15 -0800
commit3d1e690cb2a531748f8ddc4b5aef63dcf46595c8 (patch)
treeca9df1205e2aae3b8a964c4fc0c5aa9e3c288a20 /CMakeLists.txt
parentMerge pull request #636 (diff)
downloadmonero-3d1e690cb2a531748f8ddc4b5aef63dcf46595c8.tar.xz
Add make option to disable BerkeleyDB
Sample use: BERKELEY_DB=0 make debug This makes development with BlockchainLMDB easier when virtual methods have changed and don't match BlockchainBDB.
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c032bbee0..ff4f88536 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -197,7 +197,14 @@ 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 0)
+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")
set(BLOCKCHAIN_DB DB_LMDB)
@@ -206,7 +213,9 @@ if (DATABASE STREQUAL "lmdb")
if(NOT STATIC OR MINGW)
find_package(BerkeleyDB)
- if(NOT BERKELEY_DB_LIBRARIES)
+ if(BERKELEY_DB_OVERRIDE AND NOT BERKELEY_DB)
+ message(STATUS "BERKELEY_DB setting has been overridden and disabled")
+ elseif(NOT BERKELEY_DB_LIBRARIES)
message(STATUS "BerkeleyDB not found and has been disabled.")
else()
message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}")