diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 483ee72b..eed5c886 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # @@ -29,6 +29,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -44,6 +45,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -59,6 +61,7 @@ jobs: zmq: "--build-zmq" cc: "gcc" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -74,6 +77,7 @@ jobs: zmq: "--build-zmq" cc: "gcc" flags: "-Og -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -89,6 +93,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "brew" packages: "" @@ -104,6 +109,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fvisibility=hidden -fPIE" + options: "--enable-isystem" packager: "brew" packages: "" @@ -155,11 +161,16 @@ jobs: echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV fi + - name: Display CPU details + if: ${{ (runner.os == 'Linux') }} + shell: bash + run: | + lscpu + - name: Execute install.sh run: > ./install.sh - --enable-isystem - --build-dir=$LIBBITCOIN_SRC_PATH + --build-dir=$LIBBITCOIN_SRC_PATH ${{ matrix.options }} --prefix=$LIBBITCOIN_SRC_PATH/prefix ${{ env.LINKAGE }} ${{ env.ASSERT_NDEBUG }} @@ -214,11 +225,11 @@ jobs: run: | cat ${{ github.workspace }}/build/build-*/bootstrap.log + - name: Failure display otool output if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | otool -L ${{ github.workspace }}/test/.libs/libbitcoin-server-test - - name: Failure display DYLD_PRINT_LIBRARIES if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | @@ -249,6 +260,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -264,6 +276,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -279,6 +292,7 @@ jobs: zmq: "--build-zmq" cc: "gcc" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -294,6 +308,7 @@ jobs: zmq: "--build-zmq" cc: "gcc" flags: "-Og -fPIE" + options: "" packager: "apt" packages: "" @@ -309,6 +324,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "brew" packages: "" @@ -324,6 +340,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fvisibility=hidden -fPIE" + options: "" packager: "brew" packages: "" @@ -378,10 +395,16 @@ jobs: echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV fi + - name: Display CPU details + if: ${{ (runner.os == 'Linux') }} + shell: bash + run: | + lscpu + - name: Execute install-cmake.sh run: > ./install-cmake.sh - --build-dir=$LIBBITCOIN_SRC_PATH + --build-dir=$LIBBITCOIN_SRC_PATH ${{ matrix.options }} --prefix=$LIBBITCOIN_SRC_PATH/prefix ${{ env.LINKAGE }} ${{ env.ASSERT_NDEBUG }} @@ -436,11 +459,11 @@ jobs: run: | cat ${{ github.workspace }}/build/build-*/bootstrap.log + - name: Failure display otool output if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | otool -L ${{ github.workspace }}/test/.libs/libbitcoin-server-test - - name: Failure display DYLD_PRINT_LIBRARIES if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | @@ -482,6 +505,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -498,6 +522,7 @@ jobs: zmq: "--build-zmq" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -514,6 +539,7 @@ jobs: zmq: "--build-zmq" cc: "gcc" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -568,10 +594,16 @@ jobs: echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV fi + - name: Display CPU details + if: ${{ (runner.os == 'Linux') }} + shell: bash + run: | + lscpu + - name: Execute install-cmakepresets.sh run: > ./install-cmakepresets.sh - --build-dir=$LIBBITCOIN_SRC_PATH + --build-dir=$LIBBITCOIN_SRC_PATH ${{ matrix.options }} --prefix=$LIBBITCOIN_SRC_PATH/prefix/${{ matrix.preset }} --preset=${{ matrix.preset }} ${{ env.LINKAGE }} @@ -627,11 +659,11 @@ jobs: run: | cat ${{ github.workspace }}/build/build-*/bootstrap.log + - name: Failure display otool output if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | otool -L ${{ github.workspace }}/test/.libs/libbitcoin-server-test - - name: Failure display DYLD_PRINT_LIBRARIES if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | @@ -676,6 +708,8 @@ jobs: steps: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.1 + with: + msbuild-architecture: x64 - name: Checkout repository uses: actions/checkout@v3 diff --git a/Makefile.am b/Makefile.am index badd9484..2a582620 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/autogen.sh b/autogen.sh index c4be74d6..ae0d9e09 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/build.cmd b/build.cmd index 806c7468..75416f29 100644 --- a/build.cmd +++ b/build.cmd @@ -1,5 +1,5 @@ REM ########################################################################### -REM # Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +REM # Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). REM # REM # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY REM # diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index bfa98b68..57b4c628 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # @@ -16,6 +16,8 @@ enable_testing() list( APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules" ) include(CheckIncludeFiles) include(CheckSymbolExists) +include(CheckCXXCompilerFlag) +include(CheckCXXSourceCompiles) set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -40,32 +42,77 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON ) # Add compiler options #------------------------------------------------------------------------------ # Warn on all stuff. -add_compile_options( "-Wall" ) +check_cxx_compiler_flag( "-Wall" HAS_FLAG_WALL ) +if ( HAS_FLAG_WALL ) + add_compile_options( "-Wall" ) +else() + message( FATAL_ERROR "Compiler does not support -Wall" ) +endif() # Warn on extra stuff. -add_compile_options( "-Wextra" ) +check_cxx_compiler_flag( "-Wextra" HAS_FLAG_WEXTRA ) +if ( HAS_FLAG_WEXTRA ) + add_compile_options( "-Wextra" ) +else() + message( FATAL_ERROR "Compiler does not support -Wextra" ) +endif() # Be really annoying. -add_compile_options( "-Wpedantic" ) +check_cxx_compiler_flag( "-Wpedantic" HAS_FLAG_WPEDANTIC ) +if ( HAS_FLAG_WPEDANTIC ) + add_compile_options( "-Wpedantic" ) +else() + message( FATAL_ERROR "Compiler does not support -Wpedantic" ) +endif() # Disallow warning on style order of declarations. -add_compile_options( "-Wno-reorder" ) +check_cxx_compiler_flag( "-Wno-reorder" HAS_FLAG_WNO-REORDER ) +if ( HAS_FLAG_WNO-REORDER ) + add_compile_options( "-Wno-reorder" ) +else() + message( FATAL_ERROR "Compiler does not support -Wno-reorder" ) +endif() # Suppress warning for incomplete field initialization. -add_compile_options( "-Wno-missing-field-initializers" ) +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" ) +else() + message( FATAL_ERROR "Compiler does not support -Wno-missing-field-initializers" ) +endif() # Conform to style. -add_compile_options( "-Wno-missing-braces" ) +check_cxx_compiler_flag( "-Wno-missing-braces" HAS_FLAG_WNO-MISSING-BRACES ) +if ( HAS_FLAG_WNO-MISSING-BRACES ) + add_compile_options( "-Wno-missing-braces" ) +else() + message( FATAL_ERROR "Compiler does not support -Wno-missing-braces" ) +endif() # Ignore comments within comments or commenting of backslash extended lines. -add_compile_options( "-Wno-comment" ) +check_cxx_compiler_flag( "-Wno-comment" HAS_FLAG_WNO-COMMENT ) +if ( HAS_FLAG_WNO-COMMENT ) + add_compile_options( "-Wno-comment" ) +else() + message( FATAL_ERROR "Compiler does not support -Wno-comment" ) +endif() # Suppress warning for copy of implicitly generated copy constructor. -add_compile_options( "-Wno-deprecated-copy" ) +check_cxx_compiler_flag( "-Wno-deprecated-copy" HAS_FLAG_WNO-DEPRECATED-COPY ) +if ( HAS_FLAG_WNO-DEPRECATED-COPY ) + add_compile_options( "-Wno-deprecated-copy" ) +else() + message( FATAL_ERROR "Compiler does not support -Wno-deprecated-copy" ) +endif() # Conflict in stdlib under clang. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - add_compile_options( "-Wno-mismatched-tags" ) + check_cxx_compiler_flag( "-Wno-mismatched-tags" HAS_FLAG_WNO-MISMATCHED-TAGS ) + if ( HAS_FLAG_WNO-MISMATCHED-TAGS ) + add_compile_options( "-Wno-mismatched-tags" ) + else() + message( FATAL_ERROR "Compiler does not support -Wno-mismatched-tags" ) + endif() endif() # Implement -Dbash-completiondir and output ${bash-completiondir} and declare bash-completiondir. diff --git a/builds/cmake/modules/FindBash-Completion.cmake b/builds/cmake/modules/FindBash-Completion.cmake index c00e1d1b..2cc13f1f 100644 --- a/builds/cmake/modules/FindBash-Completion.cmake +++ b/builds/cmake/modules/FindBash-Completion.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/builds/cmake/modules/FindBitcoin-Node.cmake b/builds/cmake/modules/FindBitcoin-Node.cmake index 8d0d2a97..88b3a0ba 100644 --- a/builds/cmake/modules/FindBitcoin-Node.cmake +++ b/builds/cmake/modules/FindBitcoin-Node.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/builds/cmake/modules/FindBitcoin-Protocol.cmake b/builds/cmake/modules/FindBitcoin-Protocol.cmake index 6fdbc830..b346b742 100644 --- a/builds/cmake/modules/FindBitcoin-Protocol.cmake +++ b/builds/cmake/modules/FindBitcoin-Protocol.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-server developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-server developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/builds/msvc/debug.natvis b/builds/msvc/debug.natvis index 22efd888..7abe9b29 100644 --- a/builds/msvc/debug.natvis +++ b/builds/msvc/debug.natvis @@ -1,6 +1,6 @@