aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-10-04 19:01:33 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-10-04 19:01:56 +0100
commit180bcde866cb74fe1e86c16e1357a2e4eae14ee5 (patch)
tree1b8bb98b7792b935e0339ab6d7f9a175423c1f8e
parentdb_bdb: fix hard fork keys (diff)
downloadmonero-180bcde866cb74fe1e86c16e1357a2e4eae14ee5.tar.xz
build: default to Berkeley DB for 32 bit and ARM
-rw-r--r--CMakeLists.txt9
-rw-r--r--src/daemon/command_line_args.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9e21604f..aef7a52e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,8 +216,17 @@ if (DATABASE STREQUAL "lmdb")
endif()
endif()
endif()
+
+ if (BERKELEY_DB AND (ARCH_WIDTH STREQUAL "32" OR ARM6 OR ARM7))
+ message(STATUS "Using Berkeley DB as default DB type")
+ add_definitions("-DDEFAULT_DB_TYPE=\"berkeley\"")
+ else()
+ message(STATUS "Using LMDB as default DB type")
+ add_definitions("-DDEFAULT_DB_TYPE=\"lmdb\"")
+ endif()
elseif (DATABASE STREQUAL "memory")
set(BLOCKCHAIN_DB DB_MEMORY)
+ add_definitions("-DDEFAULT_DB_TYPE=\"memory\"")
else()
die("Invalid database type: ${DATABASE}")
endif()
diff --git a/src/daemon/command_line_args.h b/src/daemon/command_line_args.h
index ba98a6ea1..8da470c86 100644
--- a/src/daemon/command_line_args.h
+++ b/src/daemon/command_line_args.h
@@ -73,7 +73,7 @@ namespace daemon_args
const command_line::arg_descriptor<std::string> arg_db_type = {
"db-type"
, "Specify database type"
- , "lmdb"
+ , DEFAULT_DB_TYPE
};
const command_line::arg_descriptor<uint64_t> arg_prep_blocks_threads = {
"prep-blocks-threads"