diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index d71106a0..3032b5a4 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -45,7 +45,7 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON ) # Warn on all stuff. check_cxx_compiler_flag( "-Wall" HAS_FLAG_WALL ) if ( HAS_FLAG_WALL ) - add_compile_options( "-Wall" ) + add_compile_options( $<$:-Wall> ) else() message( FATAL_ERROR "Compiler does not support -Wall" ) endif() @@ -53,7 +53,7 @@ endif() # Warn on extra stuff. check_cxx_compiler_flag( "-Wextra" HAS_FLAG_WEXTRA ) if ( HAS_FLAG_WEXTRA ) - add_compile_options( "-Wextra" ) + add_compile_options( $<$:-Wextra> ) else() message( FATAL_ERROR "Compiler does not support -Wextra" ) endif() @@ -61,7 +61,7 @@ endif() # Be really annoying. check_cxx_compiler_flag( "-Wpedantic" HAS_FLAG_WPEDANTIC ) if ( HAS_FLAG_WPEDANTIC ) - add_compile_options( "-Wpedantic" ) + add_compile_options( $<$:-Wpedantic> ) else() message( FATAL_ERROR "Compiler does not support -Wpedantic" ) endif() @@ -69,7 +69,7 @@ endif() # Disallow warning on style order of declarations. check_cxx_compiler_flag( "-Wno-reorder" HAS_FLAG_WNO-REORDER ) if ( HAS_FLAG_WNO-REORDER ) - add_compile_options( "-Wno-reorder" ) + add_compile_options( $<$:-Wno-reorder> ) else() message( FATAL_ERROR "Compiler does not support -Wno-reorder" ) endif() @@ -77,7 +77,7 @@ endif() # Suppress warning for incomplete field initialization. check_cxx_compiler_flag( "-Wno-missing-field-initializers" HAS_FLAG_WNO-MISSING-FIELD-INITIALIZERS ) if ( HAS_FLAG_WNO-MISSING-FIELD-INITIALIZERS ) - add_compile_options( "-Wno-missing-field-initializers" ) + add_compile_options( $<$:-Wno-missing-field-initializers> ) else() message( FATAL_ERROR "Compiler does not support -Wno-missing-field-initializers" ) endif() @@ -85,7 +85,7 @@ endif() # Conform to style. check_cxx_compiler_flag( "-Wno-missing-braces" HAS_FLAG_WNO-MISSING-BRACES ) if ( HAS_FLAG_WNO-MISSING-BRACES ) - add_compile_options( "-Wno-missing-braces" ) + add_compile_options( $<$:-Wno-missing-braces> ) else() message( FATAL_ERROR "Compiler does not support -Wno-missing-braces" ) endif() @@ -93,7 +93,7 @@ endif() # Ignore comments within comments or commenting of backslash extended lines. check_cxx_compiler_flag( "-Wno-comment" HAS_FLAG_WNO-COMMENT ) if ( HAS_FLAG_WNO-COMMENT ) - add_compile_options( "-Wno-comment" ) + add_compile_options( $<$:-Wno-comment> ) else() message( FATAL_ERROR "Compiler does not support -Wno-comment" ) endif() @@ -101,7 +101,7 @@ endif() # Suppress warning for copy of implicitly generated copy constructor. check_cxx_compiler_flag( "-Wno-deprecated-copy" HAS_FLAG_WNO-DEPRECATED-COPY ) if ( HAS_FLAG_WNO-DEPRECATED-COPY ) - add_compile_options( "-Wno-deprecated-copy" ) + add_compile_options( $<$:-Wno-deprecated-copy> ) else() message( FATAL_ERROR "Compiler does not support -Wno-deprecated-copy" ) endif() @@ -110,7 +110,7 @@ endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") check_cxx_compiler_flag( "-Wno-mismatched-tags" HAS_FLAG_WNO-MISMATCHED-TAGS ) if ( HAS_FLAG_WNO-MISMATCHED-TAGS ) - add_compile_options( "-Wno-mismatched-tags" ) + add_compile_options( $<$:-Wno-mismatched-tags> ) else() message( FATAL_ERROR "Compiler does not support -Wno-mismatched-tags" ) endif() diff --git a/builds/cmake/CMakePresets.json b/builds/cmake/CMakePresets.json index 26f1f13c..e77051f7 100644 --- a/builds/cmake/CMakePresets.json +++ b/builds/cmake/CMakePresets.json @@ -79,8 +79,8 @@ "description": "Factored size optimization settings.", "hidden": true, "cacheVariables": { - "CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Os -s", - "CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Os -s" + "CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Os", + "CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Os" } }, { diff --git a/install-cmake.sh b/install-cmake.sh index 40c454ba..5b895af1 100755 --- a/install-cmake.sh +++ b/install-cmake.sh @@ -900,6 +900,7 @@ build_from_tarball_boost() "$BOOST_CXXFLAGS" \ "$BOOST_LINKFLAGS" \ "link=$BOOST_LINK" \ + "warnings=off" \ "boost.locale.iconv=$BOOST_ICU_ICONV" \ "boost.locale.posix=$BOOST_ICU_POSIX" \ "-sNO_BZIP2=1" \ @@ -923,27 +924,62 @@ build_from_tarball_boost() build_all() { unpack_from_tarball "$ICU_ARCHIVE" "$ICU_URL" gzip "$BUILD_ICU" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${ICU_FLAGS[@]}" build_from_tarball "$ICU_ARCHIVE" source "$PARALLEL" "$BUILD_ICU" "${ICU_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS + export CPPFLAGS=$SAVE_CPPFLAGS unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BOOST_FLAGS[@]}" build_from_tarball_boost "$BOOST_ARCHIVE" "$PARALLEL" "$BUILD_BOOST" "${BOOST_OPTIONS[@]}" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin secp256k1 version7 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${SECP256K1_FLAGS[@]}" build_from_github secp256k1 "$PARALLEL" false "yes" "${SECP256K1_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-system version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_SYSTEM_FLAGS[@]}" build_from_github_cmake libbitcoin-system "$PARALLEL" false "yes" "${BITCOIN_SYSTEM_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-database version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_DATABASE_FLAGS[@]}" build_from_github_cmake libbitcoin-database "$PARALLEL" false "yes" "${BITCOIN_DATABASE_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-consensus version3 "$WITH_BITCOIN_CONSENSUS" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_CONSENSUS_FLAGS[@]}" build_from_github_cmake libbitcoin-consensus "$PARALLEL" false "$WITH_BITCOIN_CONSENSUS" "${BITCOIN_CONSENSUS_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-blockchain version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_BLOCKCHAIN_FLAGS[@]}" build_from_github_cmake libbitcoin-blockchain "$PARALLEL" false "yes" "${BITCOIN_BLOCKCHAIN_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-network version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_NETWORK_FLAGS[@]}" build_from_github_cmake libbitcoin-network "$PARALLEL" false "yes" "${BITCOIN_NETWORK_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-node version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_NODE_FLAGS[@]}" build_from_github_cmake libbitcoin-node "$PARALLEL" false "yes" "${BITCOIN_NODE_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS unpack_from_tarball "$ZMQ_ARCHIVE" "$ZMQ_URL" gzip "$BUILD_ZMQ" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${ZMQ_FLAGS[@]}" build_from_tarball "$ZMQ_ARCHIVE" . "$PARALLEL" "$BUILD_ZMQ" "${ZMQ_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-protocol version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_PROTOCOL_FLAGS[@]}" build_from_github_cmake libbitcoin-protocol "$PARALLEL" false "yes" "${BITCOIN_PROTOCOL_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_SERVER_FLAGS[@]}" if [[ ! ($CI == true) ]]; then create_from_github libbitcoin libbitcoin-server version3 "yes" build_from_github_cmake libbitcoin-server "$PARALLEL" true "yes" "${BITCOIN_SERVER_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" @@ -954,6 +990,7 @@ build_all() pop_directory pop_directory fi + export CPPFLAGS=$SAVE_CPPFLAGS } @@ -975,6 +1012,24 @@ set_with_boost_prefix remove_install_options +# Define build flags. +#============================================================================== +# Define icu flags. +#------------------------------------------------------------------------------ +ICU_FLAGS=( +"-w") + +# Define secp256k1 flags. +#------------------------------------------------------------------------------ +SECP256K1_FLAGS=( +"-w") + +# Define zmq flags. +#------------------------------------------------------------------------------ +ZMQ_FLAGS=( +"-w") + + # Define build options. #============================================================================== # Define icu options. diff --git a/install-cmakepresets.sh b/install-cmakepresets.sh index 7c0f8530..e013b7e0 100755 --- a/install-cmakepresets.sh +++ b/install-cmakepresets.sh @@ -961,6 +961,7 @@ build_from_tarball_boost() "$BOOST_CXXFLAGS" \ "$BOOST_LINKFLAGS" \ "link=$BOOST_LINK" \ + "warnings=off" \ "boost.locale.iconv=$BOOST_ICU_ICONV" \ "boost.locale.posix=$BOOST_ICU_POSIX" \ "-sNO_BZIP2=1" \ @@ -984,34 +985,69 @@ build_from_tarball_boost() build_all() { unpack_from_tarball "$ICU_ARCHIVE" "$ICU_URL" gzip "$BUILD_ICU" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${ICU_FLAGS[@]}" build_from_tarball "$ICU_ARCHIVE" source "$PARALLEL" "$BUILD_ICU" "${ICU_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS + export CPPFLAGS=$SAVE_CPPFLAGS unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BOOST_FLAGS[@]}" build_from_tarball_boost "$BOOST_ARCHIVE" "$PARALLEL" "$BUILD_BOOST" "${BOOST_OPTIONS[@]}" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin secp256k1 version7 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${SECP256K1_FLAGS[@]}" build_from_github secp256k1 "$PARALLEL" false "yes" "${SECP256K1_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-system version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_SYSTEM_FLAGS[@]}" display_message "libbitcoin-system PRESET ${REPO_PRESET[libbitcoin-system]}" build_from_github_cmake libbitcoin-system ${REPO_PRESET[libbitcoin-system]} "$PARALLEL" false "yes" "${BITCOIN_SYSTEM_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-database version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_DATABASE_FLAGS[@]}" display_message "libbitcoin-database PRESET ${REPO_PRESET[libbitcoin-database]}" build_from_github_cmake libbitcoin-database ${REPO_PRESET[libbitcoin-database]} "$PARALLEL" false "yes" "${BITCOIN_DATABASE_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-consensus version3 "$WITH_BITCOIN_CONSENSUS" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_CONSENSUS_FLAGS[@]}" display_message "libbitcoin-consensus PRESET ${REPO_PRESET[libbitcoin-consensus]}" build_from_github_cmake libbitcoin-consensus ${REPO_PRESET[libbitcoin-consensus]} "$PARALLEL" false "$WITH_BITCOIN_CONSENSUS" "${BITCOIN_CONSENSUS_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-blockchain version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_BLOCKCHAIN_FLAGS[@]}" display_message "libbitcoin-blockchain PRESET ${REPO_PRESET[libbitcoin-blockchain]}" build_from_github_cmake libbitcoin-blockchain ${REPO_PRESET[libbitcoin-blockchain]} "$PARALLEL" false "yes" "${BITCOIN_BLOCKCHAIN_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-network version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_NETWORK_FLAGS[@]}" display_message "libbitcoin-network PRESET ${REPO_PRESET[libbitcoin-network]}" build_from_github_cmake libbitcoin-network ${REPO_PRESET[libbitcoin-network]} "$PARALLEL" false "yes" "${BITCOIN_NETWORK_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-node version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_NODE_FLAGS[@]}" display_message "libbitcoin-node PRESET ${REPO_PRESET[libbitcoin-node]}" build_from_github_cmake libbitcoin-node ${REPO_PRESET[libbitcoin-node]} "$PARALLEL" false "yes" "${BITCOIN_NODE_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS unpack_from_tarball "$ZMQ_ARCHIVE" "$ZMQ_URL" gzip "$BUILD_ZMQ" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${ZMQ_FLAGS[@]}" build_from_tarball "$ZMQ_ARCHIVE" . "$PARALLEL" "$BUILD_ZMQ" "${ZMQ_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-protocol version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_PROTOCOL_FLAGS[@]}" display_message "libbitcoin-protocol PRESET ${REPO_PRESET[libbitcoin-protocol]}" build_from_github_cmake libbitcoin-protocol ${REPO_PRESET[libbitcoin-protocol]} "$PARALLEL" false "yes" "${BITCOIN_PROTOCOL_OPTIONS[@]}" $CUMULATIVE_FILTERED_ARGS_CMAKE "$@" + export CPPFLAGS=$SAVE_CPPFLAGS + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_SERVER_FLAGS[@]}" if [[ ! ($CI == true) ]]; then create_from_github libbitcoin libbitcoin-server version3 "yes" display_message "libbitcoin-server PRESET ${REPO_PRESET[libbitcoin-server]}" @@ -1024,6 +1060,7 @@ build_all() pop_directory pop_directory fi + export CPPFLAGS=$SAVE_CPPFLAGS } @@ -1045,6 +1082,24 @@ set_with_boost_prefix remove_install_options +# Define build flags. +#============================================================================== +# Define icu flags. +#------------------------------------------------------------------------------ +ICU_FLAGS=( +"-w") + +# Define secp256k1 flags. +#------------------------------------------------------------------------------ +SECP256K1_FLAGS=( +"-w") + +# Define zmq flags. +#------------------------------------------------------------------------------ +ZMQ_FLAGS=( +"-w") + + # Define build options. #============================================================================== # Define icu options. diff --git a/install.sh b/install.sh index fd358b00..2a17baf2 100755 --- a/install.sh +++ b/install.sh @@ -766,6 +766,7 @@ build_from_tarball_boost() "$BOOST_CXXFLAGS" \ "$BOOST_LINKFLAGS" \ "link=$BOOST_LINK" \ + "warnings=off" \ "boost.locale.iconv=$BOOST_ICU_ICONV" \ "boost.locale.posix=$BOOST_ICU_POSIX" \ "-sNO_BZIP2=1" \ @@ -789,27 +790,62 @@ build_from_tarball_boost() build_all() { unpack_from_tarball "$ICU_ARCHIVE" "$ICU_URL" gzip "$BUILD_ICU" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${ICU_FLAGS[@]}" build_from_tarball "$ICU_ARCHIVE" source "$PARALLEL" "$BUILD_ICU" "${ICU_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS unpack_from_tarball "$BOOST_ARCHIVE" "$BOOST_URL" bzip2 "$BUILD_BOOST" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BOOST_FLAGS[@]}" build_from_tarball_boost "$BOOST_ARCHIVE" "$PARALLEL" "$BUILD_BOOST" "${BOOST_OPTIONS[@]}" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin secp256k1 version7 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${SECP256K1_FLAGS[@]}" build_from_github secp256k1 "$PARALLEL" false "yes" "${SECP256K1_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-system version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_SYSTEM_FLAGS[@]}" build_from_github libbitcoin-system "$PARALLEL" false "yes" "${BITCOIN_SYSTEM_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-database version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_DATABASE_FLAGS[@]}" build_from_github libbitcoin-database "$PARALLEL" false "yes" "${BITCOIN_DATABASE_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-consensus version3 "$WITH_BITCOIN_CONSENSUS" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_CONSENSUS_FLAGS[@]}" build_from_github libbitcoin-consensus "$PARALLEL" false "$WITH_BITCOIN_CONSENSUS" "${BITCOIN_CONSENSUS_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-blockchain version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_BLOCKCHAIN_FLAGS[@]}" build_from_github libbitcoin-blockchain "$PARALLEL" false "yes" "${BITCOIN_BLOCKCHAIN_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-network version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_NETWORK_FLAGS[@]}" build_from_github libbitcoin-network "$PARALLEL" false "yes" "${BITCOIN_NETWORK_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-node version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_NODE_FLAGS[@]}" build_from_github libbitcoin-node "$PARALLEL" false "yes" "${BITCOIN_NODE_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS unpack_from_tarball "$ZMQ_ARCHIVE" "$ZMQ_URL" gzip "$BUILD_ZMQ" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${ZMQ_FLAGS[@]}" build_from_tarball "$ZMQ_ARCHIVE" . "$PARALLEL" "$BUILD_ZMQ" "${ZMQ_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS create_from_github libbitcoin libbitcoin-protocol version3 "yes" + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_PROTOCOL_FLAGS[@]}" build_from_github libbitcoin-protocol "$PARALLEL" false "yes" "${BITCOIN_PROTOCOL_OPTIONS[@]}" "$@" + export CPPFLAGS=$SAVE_CPPFLAGS + local SAVE_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS ${BITCOIN_SERVER_FLAGS[@]}" if [[ ! ($CI == true) ]]; then create_from_github libbitcoin libbitcoin-server version3 "yes" build_from_github libbitcoin-server "$PARALLEL" true "yes" "${BITCOIN_SERVER_OPTIONS[@]}" "$@" @@ -820,6 +856,7 @@ build_all() pop_directory pop_directory fi + export CPPFLAGS=$SAVE_CPPFLAGS } @@ -840,6 +877,24 @@ set_pkgconfigdir set_with_boost_prefix +# Define build flags. +#============================================================================== +# Define icu flags. +#------------------------------------------------------------------------------ +ICU_FLAGS=( +"-w") + +# Define secp256k1 flags. +#------------------------------------------------------------------------------ +SECP256K1_FLAGS=( +"-w") + +# Define zmq flags. +#------------------------------------------------------------------------------ +ZMQ_FLAGS=( +"-w") + + # Define build options. #============================================================================== # Define icu options.