Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# Copyright (c) 2023-present The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or https://opensource.org/license/mit/.5function(create_test_config)6set(abs_top_srcdir ${PROJECT_SOURCE_DIR})7set(abs_top_builddir ${PROJECT_BINARY_DIR})8set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})10macro(set_configure_variable var conf_var)11if(${var})12set(${conf_var}_VALUE true)13else()14set(${conf_var}_VALUE false)15endif()16endmacro()18set_configure_variable(ENABLE_WALLET ENABLE_WALLET)19set_configure_variable(BUILD_BENCH BUILD_BENCH)20set_configure_variable(BUILD_CLI BUILD_BITCOIN_CLI)21set_configure_variable(BUILD_TX BUILD_BITCOIN_TX)22set_configure_variable(BUILD_UTIL BUILD_BITCOIN_UTIL)23set_configure_variable(BUILD_UTIL_CHAINSTATE BUILD_BITCOIN_CHAINSTATE)24set_configure_variable(BUILD_WALLET_TOOL BUILD_BITCOIN_WALLET)25set_configure_variable(BUILD_DAEMON BUILD_BITCOIND)26set_configure_variable(BUILD_FUZZ_BINARY ENABLE_FUZZ_BINARY)27set_configure_variable(WITH_ZMQ ENABLE_ZMQ)28set_configure_variable(WITH_EMBEDDED_ASMAP ENABLE_EMBEDDED_ASMAP)29set_configure_variable(ENABLE_EXTERNAL_SIGNER ENABLE_EXTERNAL_SIGNER)30set_configure_variable(WITH_USDT ENABLE_USDT_TRACEPOINTS)31set_configure_variable(ENABLE_IPC ENABLE_IPC)32set_configure_variable(BUILD_GUI BUILD_GUI)34configure_file(config.ini.in config.ini USE_SOURCE_PERMISSIONS @ONLY)35endfunction()37create_test_config()40function(create_test_directory_links)41file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional)42file(GLOB functional43LIST_DIRECTORIES FALSE44RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}45functional/*.html46functional/*.py47)49file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/data)50file(GLOB functional_data51LIST_DIRECTORIES FALSE52RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}53functional/data/*.json54functional/data/*.py55)57file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/mocks)58file(GLOB functional_mocks59LIST_DIRECTORIES FALSE60RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}61functional/mocks/*.py62)64file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/test_framework)65file(GLOB functional_test_framework66LIST_DIRECTORIES FALSE67RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}68functional/test_framework/*.csv69functional/test_framework/*.py70)72file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/functional/test_framework/crypto)73file(GLOB functional_test_framework_crypto74LIST_DIRECTORIES FALSE75RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}76functional/test_framework/crypto/*.csv77functional/test_framework/crypto/*.py78)80file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/fuzz)81set(files_to_link82${functional}83${functional_data}84${functional_mocks}85${functional_test_framework}86${functional_test_framework_crypto}87fuzz/test_runner.py88)90foreach(f IN LISTS files_to_link)91if(CMAKE_HOST_WIN32)92set(symlink)93else()94set(symlink SYMBOLIC)95endif()96file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/${f} ${CMAKE_CURRENT_BINARY_DIR}/${f} COPY_ON_ERROR ${symlink})97endforeach()99configure_file(${PROJECT_SOURCE_DIR}/src/test/data/siphash.json ${PROJECT_BINARY_DIR}/src/test/data/siphash.json COPYONLY)100endfunction()102create_test_directory_links()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.