0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-12 11:19:08 -05:00

Merge bitcoin/bitcoin#30867: build: Fix ENABLE_WALLET option

0037d53d1a build: Fix `ENABLE_WALLET` option (Hennadii Stepanov)

Pull request description:

  The removed commands were left over from the transition from autodetection to explicit options in the CMake staging branch. These commands prevented the `-DENABLE_WALLET=OFF` option from being work properly when building with depends.

  How to test:
  ```
  $ make -C depends NO_QT=1
  ```

  On the master branch @ c66c68345e:
  ```
  $ rm -rf build && cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake -DENABLE_WALLET=OFF
  < snip >
  Optional features:
    wallet support ...................... ON
     - descriptor wallets (SQLite) ...... ON
     - legacy wallets (Berkeley DB) ..... ON
    external signer ..................... ON
  < snip >
  ```

  With this PR:
  ```
  $ rm -rf build && cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake -DENABLE_WALLET=OFF
  < snip >
  Optional features:
    wallet support ...................... OFF
    external signer ..................... ON
  < snip >

ACKs for top commit:
  maflcko:
    review ACK 0037d53d1a
  kevkevinpal:
    ACK [0037d53](0037d53d1a)
  pablomartin4btc:
    tACK 0037d53d1a

Tree-SHA512: 0eb14ef104f12a4205172d646c2af820e04514286b5b9a4ceb59c248ce880198dd4051d669098c46c0c0dce069bb60899d90509bbcae65cbeb958e52564fe920
This commit is contained in:
merge-script 2024-09-12 09:28:20 +01:00
commit c773618886
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -103,14 +103,12 @@ if(WITH_SQLITE)
find_package(SQLite3 3.7.17 REQUIRED) find_package(SQLite3 3.7.17 REQUIRED)
endif() endif()
set(USE_SQLITE ON) set(USE_SQLITE ON)
set(ENABLE_WALLET ON)
endif() endif()
option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF) option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF)
cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF) cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF)
if(WITH_BDB) if(WITH_BDB)
find_package(BerkeleyDB 4.8 MODULE REQUIRED) find_package(BerkeleyDB 4.8 MODULE REQUIRED)
set(USE_BDB ON) set(USE_BDB ON)
set(ENABLE_WALLET ON)
if(NOT BerkeleyDB_VERSION VERSION_EQUAL 4.8) if(NOT BerkeleyDB_VERSION VERSION_EQUAL 4.8)
message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n" message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n"
"BDB (legacy) wallets opened by this build will not be portable!" "BDB (legacy) wallets opened by this build will not be portable!"