|
9 | 9 | # - CMake 3.26.5, https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/ |
10 | 10 | cmake_minimum_required(VERSION 3.22) |
11 | 11 |
|
12 | | -if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) |
| 12 | +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |
13 | 13 | message(FATAL_ERROR "In-source builds are not allowed.") |
14 | 14 | endif() |
15 | 15 |
|
| 16 | +if(POLICY CMP0171) |
| 17 | + # `codegen` is a reserved target name. |
| 18 | + # See: https://cmake.org/cmake/help/latest/policy/CMP0171.html |
| 19 | + cmake_policy(SET CMP0171 NEW) |
| 20 | +endif() |
| 21 | + |
16 | 22 | #============================= |
17 | 23 | # Project / Package metadata |
18 | 24 | #============================= |
19 | 25 | set(CLIENT_NAME "Bitcoin Core") |
20 | | -set(CLIENT_VERSION_MAJOR 28) |
| 26 | +set(CLIENT_VERSION_MAJOR 29) |
21 | 27 | set(CLIENT_VERSION_MINOR 99) |
22 | 28 | set(CLIENT_VERSION_BUILD 0) |
23 | 29 | set(CLIENT_VERSION_RC 0) |
@@ -97,15 +103,13 @@ option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL |
97 | 103 | option(BUILD_KERNEL_TEST "Build tests for the experimental bitcoinkernel library." ${BUILD_KERNEL_LIB}) |
98 | 104 |
|
99 | 105 | option(ENABLE_WALLET "Enable wallet." ON) |
100 | | -option(WITH_SQLITE "Enable SQLite wallet support." ${ENABLE_WALLET}) |
101 | | -if(WITH_SQLITE) |
| 106 | +if(ENABLE_WALLET) |
102 | 107 | if(VCPKG_TARGET_TRIPLET) |
103 | 108 | # Use of the `unofficial::` namespace is a vcpkg package manager convention. |
104 | 109 | find_package(unofficial-sqlite3 CONFIG REQUIRED) |
105 | 110 | else() |
106 | 111 | find_package(SQLite3 3.7.17 REQUIRED) |
107 | 112 | endif() |
108 | | - set(USE_SQLITE ON) |
109 | 113 | endif() |
110 | 114 | option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF) |
111 | 115 | cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF) |
@@ -380,13 +384,16 @@ endif() |
380 | 384 | target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS}) |
381 | 385 |
|
382 | 386 | if(BUILD_FUZZ_BINARY) |
383 | | - include(CheckSourceCompilesAndLinks) |
384 | | - check_cxx_source_links_with_flags("${SANITIZER_LDFLAGS}" " |
| 387 | + target_link_libraries(core_interface INTERFACE ${FUZZ_LIBS}) |
| 388 | + include(CheckSourceCompilesWithFlags) |
| 389 | + check_cxx_source_compiles_with_flags(" |
385 | 390 | #include <cstdint> |
386 | 391 | #include <cstddef> |
387 | 392 | extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } |
388 | 393 | // No main() function. |
389 | 394 | " FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION |
| 395 | + LDFLAGS ${SANITIZER_LDFLAGS} |
| 396 | + LINK_LIBRARIES ${FUZZ_LIBS} |
390 | 397 | ) |
391 | 398 | endif() |
392 | 399 |
|
@@ -608,9 +615,6 @@ endif() |
608 | 615 | add_subdirectory(test) |
609 | 616 | add_subdirectory(doc) |
610 | 617 |
|
611 | | -include(cmake/crc32c.cmake) |
612 | | -include(cmake/leveldb.cmake) |
613 | | -include(cmake/minisketch.cmake) |
614 | 618 | add_subdirectory(src) |
615 | 619 |
|
616 | 620 | include(cmake/tests.cmake) |
@@ -649,7 +653,6 @@ message(" kernel-test (experimental) .......... ${BUILD_KERNEL_TEST}") |
649 | 653 | message("Optional features:") |
650 | 654 | message(" wallet support ...................... ${ENABLE_WALLET}") |
651 | 655 | if(ENABLE_WALLET) |
652 | | - message(" - descriptor wallets (SQLite) ...... ${WITH_SQLITE}") |
653 | 656 | message(" - legacy wallets (Berkeley DB) ..... ${WITH_BDB}") |
654 | 657 | endif() |
655 | 658 | message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}") |
|
0 commit comments