diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad5b1af6e4..4f6ede477a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-system developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-system developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # @@ -27,6 +27,7 @@ jobs: icu: "" cc: "clang" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -40,6 +41,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -53,6 +55,7 @@ jobs: icu: "" cc: "gcc" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "apt" packages: "" @@ -66,6 +69,7 @@ jobs: icu: "--build-icu --with-icu" cc: "gcc" flags: "-Og -g --coverage -fPIE" + options: "--enable-isystem" packager: "apt" packages: "lcov" @@ -79,6 +83,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fPIE" + options: "--enable-isystem" packager: "brew" packages: "" @@ -92,6 +97,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fvisibility=hidden -fPIE" + options: "--enable-isystem" packager: "brew" packages: "" @@ -143,11 +149,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 }} @@ -200,11 +211,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-system-test - - name: Failure display DYLD_PRINT_LIBRARIES if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | @@ -233,6 +244,7 @@ jobs: icu: "" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -246,6 +258,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -259,6 +272,7 @@ jobs: icu: "" cc: "gcc" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -272,6 +286,7 @@ jobs: icu: "--build-icu --with-icu" cc: "gcc" flags: "-Og -fPIE" + options: "" packager: "apt" packages: "" @@ -285,6 +300,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "brew" packages: "" @@ -298,6 +314,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fvisibility=hidden -fPIE" + options: "" packager: "brew" packages: "" @@ -352,10 +369,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 }} @@ -408,11 +431,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-system-test - - name: Failure display DYLD_PRINT_LIBRARIES if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | @@ -452,6 +475,7 @@ jobs: icu: "" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -466,6 +490,7 @@ jobs: icu: "--build-icu --with-icu" cc: "clang" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -480,6 +505,7 @@ jobs: icu: "" cc: "gcc" flags: "-Os -fPIE" + options: "" packager: "apt" packages: "" @@ -534,10 +560,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 }} @@ -591,11 +623,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-system-test - - name: Failure display DYLD_PRINT_LIBRARIES if: ${{ failure() && (matrix.os == 'macos-latest') }} run: | @@ -652,6 +684,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 50a062a0f2..abbc4c74b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-system developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-system developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/autogen.sh b/autogen.sh index c8c661a3d1..65589d767f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-system developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-system developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/build.cmd b/build.cmd index 6c92c1dad7..4b692a746a 100644 --- a/build.cmd +++ b/build.cmd @@ -1,5 +1,5 @@ REM ########################################################################### -REM # Copyright (c) 2014-2020 libbitcoin-system developers (see COPYING). +REM # Copyright (c) 2014-2023 libbitcoin-system 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 acae013dde..3a41f330e9 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-system developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-system 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,40 +42,95 @@ 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() # Allow use of C99 'long long' type. -add_compile_options( "-Wno-long-long" ) +check_cxx_compiler_flag( "-Wno-long-long" HAS_FLAG_WNO-LONG-LONG ) +if ( HAS_FLAG_WNO-LONG-LONG ) + add_compile_options( "-Wno-long-long" ) +else() + message( FATAL_ERROR "Compiler does not support -Wno-long-long" ) +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() # Limit delays and warnings. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - add_compile_options( "-fno-var-tracking-assignments" ) + check_cxx_compiler_flag( "-fno-var-tracking-assignments" HAS_FLAG_FNO-VAR-TRACKING-ASSIGNMENTS ) + if ( HAS_FLAG_FNO-VAR-TRACKING-ASSIGNMENTS ) + add_compile_options( "-fno-var-tracking-assignments" ) + else() + message( FATAL_ERROR "Compiler does not support -fno-var-tracking-assignments" ) + endif() endif() # Implement -Dpkgconfigdir and output ${pkgconfigdir}. diff --git a/builds/cmake/modules/FindDl.cmake b/builds/cmake/modules/FindDl.cmake index 0ea1cb3d85..b152924fe0 100644 --- a/builds/cmake/modules/FindDl.cmake +++ b/builds/cmake/modules/FindDl.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin developers (see COPYING). # ############################################################################### # Finddl diff --git a/builds/cmake/modules/FindIcu-I18N.cmake b/builds/cmake/modules/FindIcu-I18N.cmake index 6a8bef2822..7f7e14449e 100644 --- a/builds/cmake/modules/FindIcu-I18N.cmake +++ b/builds/cmake/modules/FindIcu-I18N.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/builds/cmake/modules/FindRt.cmake b/builds/cmake/modules/FindRt.cmake index 2859c2a66f..2afa7f67a7 100644 --- a/builds/cmake/modules/FindRt.cmake +++ b/builds/cmake/modules/FindRt.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin developers (see COPYING). # ############################################################################### # Findrt diff --git a/builds/cmake/modules/FindSecp256K1.cmake b/builds/cmake/modules/FindSecp256K1.cmake index 78d312857f..c710360ab4 100644 --- a/builds/cmake/modules/FindSecp256K1.cmake +++ b/builds/cmake/modules/FindSecp256K1.cmake @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014-2020 libbitcoin-consensus developers (see COPYING). +# Copyright (c) 2014-2023 libbitcoin-consensus developers (see COPYING). # # GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY # diff --git a/builds/msvc/debug.natvis b/builds/msvc/debug.natvis index 1f56d5adc0..55fec18ed3 100644 --- a/builds/msvc/debug.natvis +++ b/builds/msvc/debug.natvis @@ -1,6 +1,6 @@