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) 2025-present The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or https://opensource.org/license/mit/.5function(add_libmultiprocess subdir)6# Set BUILD_TESTING to match BUILD_TESTS. BUILD_TESTING is a standard cmake7# option that controls whether enable_testing() is called, but in the bitcoin8# build a BUILD_TESTS option is used instead.9set(BUILD_TESTING "${BUILD_TESTS}")10add_subdirectory(${subdir} EXCLUDE_FROM_ALL)11# Apply core_interface compile options to libmultiprocess runtime library.12target_link_libraries(multiprocess PUBLIC $<BUILD_INTERFACE:core_interface>)13target_link_libraries(mputil PUBLIC $<BUILD_INTERFACE:core_interface>)14target_link_libraries(mpgen PUBLIC $<BUILD_INTERFACE:core_interface>)15# Mark capproto options as advanced to hide by default from cmake UI16mark_as_advanced(CapnProto_DIR)17mark_as_advanced(CapnProto_capnpc_IMPORTED_LOCATION)18mark_as_advanced(CapnProto_capnp_IMPORTED_LOCATION)19mark_as_advanced(CapnProto_capnp-json_IMPORTED_LOCATION)20mark_as_advanced(CapnProto_capnp-rpc_IMPORTED_LOCATION)21mark_as_advanced(CapnProto_capnp-websocket_IMPORTED_LOCATION)22mark_as_advanced(CapnProto_kj-async_IMPORTED_LOCATION)23mark_as_advanced(CapnProto_kj-gzip_IMPORTED_LOCATION)24mark_as_advanced(CapnProto_kj-http_IMPORTED_LOCATION)25mark_as_advanced(CapnProto_kj_IMPORTED_LOCATION)26mark_as_advanced(CapnProto_kj-test_IMPORTED_LOCATION)27mark_as_advanced(CapnProto_kj-tls_IMPORTED_LOCATION)28if(BUILD_TESTS)29# Add tests to "all" target so ctest can run them30set_target_properties(mptest PROPERTIES EXCLUDE_FROM_ALL OFF)31endif()32# Exclude examples from compilation database, because the examples are not33# built by default, and they contain generated c++ code. Without this34# exclusion, tools like clang-tidy and IWYU that make use of compilation35# database would complain that the generated c++ source files do not exist. An36# alternate fix could build "mpexamples" by default like "mptests" above.37set_target_properties(mpcalculator mpprinter mpexample PROPERTIES EXPORT_COMPILE_COMMANDS OFF)38endfunction()
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.