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.
1include_guard(GLOBAL)3function(indent_message header content indent_num)4if(indent_num GREATER 0)5string(REPEAT " " ${indent_num} indentation)6string(REPEAT "." ${indent_num} tail)7string(REGEX REPLACE "${tail}$" "" header "${header}")8endif()9message("${indentation}${header} ${content}")10endfunction()12# Print compiler's flags on best-effort. Include the abstracted13# CMake flags that we touch ourselves.14function(print_flags_per_config config indent_num)15string(STRIP "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS}" combined_cxx_flags)16string(TOUPPER "${config}" config_uppercase)17string(STRIP "${combined_cxx_flags} ${CMAKE_CXX_FLAGS_${config_uppercase}}" combined_cxx_flags)18string(STRIP "${combined_cxx_flags} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}" combined_cxx_flags)19if(CMAKE_POSITION_INDEPENDENT_CODE)20string(JOIN " " combined_cxx_flags ${combined_cxx_flags} ${CMAKE_CXX_COMPILE_OPTIONS_PIC})21endif()22if(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY AND CMAKE_CXX_VISIBILITY_PRESET)23string(JOIN " " combined_cxx_flags ${combined_cxx_flags} ${CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY}${CMAKE_CXX_VISIBILITY_PRESET})24endif()25get_directory_property(compile_options COMPILE_OPTIONS)26string(JOIN " " combined_cxx_flags ${combined_cxx_flags} ${compile_options})27indent_message("CXXFLAGS .............................." "${combined_cxx_flags}" ${indent_num})28endfunction()30function(print_configure_summary)31message("")32if(PROJECT_IS_TOP_LEVEL)33message("Configure summary")34message("=================")35else()36message("minisketch configure summary")37message("============================")38endif()39if(BUILD_SHARED_LIBS)40set(library_type "Shared")41else()42set(library_type "Static")43endif()44message("Library type .......................... ${library_type}")45message("Build options:")46if(have_disabled_fields)47set(filed_sizes "${MINISKETCH_FIELDS}")48else()49set(filed_sizes "All")50endif()51message(" field sizes ........................ ${filed_sizes}")52if(HAVE_CLMUL)53set(clmul_status "Enabled")54else()55set(clmul_status "Disabled")56endif()57message(" clmul fields ........................ ${clmul_status}")58if(CMAKE_CXX_STANDARD GREATER_EQUAL 20)59set(clz_status "C++20")60elseif(HAVE_CLZ)61set(clz_status "Compiler builtin")62else()63set(clz_status "Default")64endif()65message(" clz implementation .................. ${clz_status}")66message("Optional binaries:")67message(" benchmark ........................... ${MINISKETCH_BUILD_BENCHMARK}")68message(" tests ............................... ${MINISKETCH_BUILD_TESTS}")69message("")70if(CMAKE_CROSSCOMPILING)71set(cross_status "TRUE, for ${CMAKE_SYSTEM_NAME}, ${CMAKE_SYSTEM_PROCESSOR}")72else()73set(cross_status "FALSE")74endif()75message("Cross compiling ....................... ${cross_status}")76message("C++ compiler .......................... ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, ${CMAKE_CXX_COMPILER}")77get_property(_is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)78if(_is_multi_config)79list(JOIN CMAKE_CONFIGURATION_TYPES ", " configs)80message("Available build configurations ........ ${configs}")81if(CMAKE_GENERATOR MATCHES "Visual Studio")82set(default_config "Debug")83else()84list(GET CMAKE_CONFIGURATION_TYPES 0 default_config)85endif()86message("Default build configuration ........... ${default_config}")87foreach(config IN LISTS CMAKE_CONFIGURATION_TYPES)88message("'${config}' build configuration:")89print_flags_per_config("${config}" 2)90endforeach()91else()92message("CMAKE_BUILD_TYPE ...................... ${CMAKE_BUILD_TYPE}")93print_flags_per_config("${CMAKE_BUILD_TYPE}" 0)94endif()95unset(_is_multi_config)97message([=[99NOTE: The summary above may not exactly match the final applied build flags100if any additional CMAKE_* or environment variables have been modified.101To see the exact flags applied, build with the --verbose option.]=]102)104if(have_disabled_fields AND PROJECT_IS_TOP_LEVEL)105message("")106message(WARNING107"Only compiling in support for field sizes: ${MINISKETCH_FIELDS}\n"108"This means the library will lack support for other field sizes entirely.\n"109)110endif()111message("")112endfunction()
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.