Merge pull request #640
3d1e690
Add make option to disable BerkeleyDB (warptangent)
This commit is contained in:
commit
18b12cd24f
1 changed files with 11 additions and 2 deletions
|
@ -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})")
|
message(STATUS "Could not find DATABASE in env (not required unless you want to change database type from default: ${DATABASE})")
|
||||||
endif()
|
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)
|
set(BERKELEY_DB 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DATABASE STREQUAL "lmdb")
|
if (DATABASE STREQUAL "lmdb")
|
||||||
set(BLOCKCHAIN_DB DB_LMDB)
|
set(BLOCKCHAIN_DB DB_LMDB)
|
||||||
|
|
||||||
|
@ -206,7 +213,9 @@ if (DATABASE STREQUAL "lmdb")
|
||||||
if(NOT STATIC OR MINGW)
|
if(NOT STATIC OR MINGW)
|
||||||
find_package(BerkeleyDB)
|
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.")
|
message(STATUS "BerkeleyDB not found and has been disabled.")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}")
|
message(STATUS "Found BerkeleyDB include (db.h) in ${BERKELEY_DB_INCLUDE_DIR}")
|
||||||
|
|
Loading…
Reference in a new issue