Skip to content

Commit

Permalink
Regenerate artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmienk committed Apr 27, 2023
1 parent 920d272 commit 96f39ad
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 63 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ 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
Expand Down Expand Up @@ -200,11 +206,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-consensus-test
- name: Failure display DYLD_PRINT_LIBRARIES
if: ${{ failure() && (matrix.os == 'macos-latest') }}
run: |
Expand Down Expand Up @@ -352,6 +358,12 @@ 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
Expand Down Expand Up @@ -408,11 +420,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-consensus-test
- name: Failure display DYLD_PRINT_LIBRARIES
if: ${{ failure() && (matrix.os == 'macos-latest') }}
run: |
Expand Down Expand Up @@ -534,6 +546,12 @@ 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
Expand Down Expand Up @@ -591,11 +609,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-consensus-test
- name: Failure display DYLD_PRINT_LIBRARIES
if: ${{ failure() && (matrix.os == 'macos-latest') }}
run: |
Expand Down
72 changes: 62 additions & 10 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -40,37 +42,87 @@ 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()

# 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()

# Suppress frequent warning in cloned files.
add_compile_options( "-Wno-unused-parameter" )
check_cxx_compiler_flag( "-Wno-unused-parameter" HAS_FLAG_WNO-UNUSED-PARAMETER )
if ( HAS_FLAG_WNO-UNUSED-PARAMETER )
add_compile_options( "-Wno-unused-parameter" )
else()
message( FATAL_ERROR "Compiler does not support -Wno-unused-parameter" )
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()

# Suppress frequent warning in cloned files.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options( "-Wno-c++17-extensions" )
check_cxx_compiler_flag( "-Wno-c++17-extensions" HAS_FLAG_WNO-C++17-EXTENSIONS )
if ( HAS_FLAG_WNO-C++17-EXTENSIONS )
add_compile_options( "-Wno-c++17-extensions" )
else()
message( FATAL_ERROR "Compiler does not support -Wno-c++17-extensions" )
endif()
endif()

# Implement -Dpkgconfigdir and output ${pkgconfigdir}.
Expand Down
100 changes: 50 additions & 50 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -343,56 +343,6 @@ AC_CHECK_HEADERS([sys/endian.h],
#endif])])


# Check dependencies.
#==============================================================================
# Require Boost of at least version 1.76.0 and output ${boost_CPPFLAGS/LDFLAGS}.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_BOOST_BASE([1.76.0],
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
AC_SUBST([boost_ISYS_CPPFLAGS], [`echo ${BOOST_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`])
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}])
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
[AC_MSG_ERROR([Boost 1.76.0 or later is required but was not found.])])])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}])])

AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}])

AS_CASE([${with_tests}], [yes],
[AX_BOOST_UNIT_TEST_FRAMEWORK
AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}])
AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}])],
[AC_SUBST([boost_unit_test_framework_LIBS], [])])

# Require secp256k1 of at least version 0.1.0.20 and output ${secp256k1_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
PKG_CHECK_MODULES([secp256k1], [libsecp256k1 >= 0.1.0.20],
[secp256k1_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libsecp256k1 >= 0.1.0.20" 2>/dev/null`"
secp256k1_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libsecp256k1 >= 0.1.0.20" 2>/dev/null`"],
[AC_MSG_ERROR([libsecp256k1 >= 0.1.0.20 is required but was not found.])])
AC_SUBST([secp256k1_PKG], ['libsecp256k1 >= 0.1.0.20'])
AC_SUBST([secp256k1_CPPFLAGS], [${secp256k1_CFLAGS}])
AS_IF([test x${secp256k1_INCLUDEDIR} != "x"],
[AC_SUBST([secp256k1_ISYS_CPPFLAGS], ["-isystem${secp256k1_INCLUDEDIR} ${secp256k1_OTHER_CFLAGS}"])],
[AC_SUBST([secp256k1_ISYS_CPPFLAGS], [${secp256k1_OTHER_CFLAGS}])])
AC_MSG_NOTICE([secp256k1_CPPFLAGS : ${secp256k1_CPPFLAGS}])
AC_MSG_NOTICE([secp256k1_ISYS_CPPFLAGS : ${secp256k1_ISYS_CPPFLAGS}])
AC_MSG_NOTICE([secp256k1_OTHER_CFLAGS : ${secp256k1_OTHER_CFLAGS}])
AC_MSG_NOTICE([secp256k1_INCLUDEDIR : ${secp256k1_INCLUDEDIR}])
AC_MSG_NOTICE([secp256k1_LIBS : ${secp256k1_LIBS}])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([secp256k1_BUILD_CPPFLAGS], [${secp256k1_ISYS_CPPFLAGS}])],
[AC_SUBST([secp256k1_BUILD_CPPFLAGS], [${secp256k1_CPPFLAGS}])])

AC_MSG_NOTICE([secp256k1_BUILD_CPPFLAGS : ${secp256k1_BUILD_CPPFLAGS}])


# Set flags.
#==============================================================================
# Require c++20 for all c++ products.
Expand Down Expand Up @@ -486,6 +436,56 @@ AS_CASE([${CC}], [*clang*],
[CXXFLAGS="$CXXFLAGS -Wno-c++17-extensions"])])


# Check dependencies.
#==============================================================================
# Require Boost of at least version 1.76.0 and output ${boost_CPPFLAGS/LDFLAGS}.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_BOOST_BASE([1.76.0],
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
AC_SUBST([boost_ISYS_CPPFLAGS], [`echo ${BOOST_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`])
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}])
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
[AC_MSG_ERROR([Boost 1.76.0 or later is required but was not found.])])])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}])])

AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}])

AS_CASE([${with_tests}], [yes],
[AX_BOOST_UNIT_TEST_FRAMEWORK
AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}])
AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}])],
[AC_SUBST([boost_unit_test_framework_LIBS], [])])

# Require secp256k1 of at least version 0.1.0.20 and output ${secp256k1_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
PKG_CHECK_MODULES([secp256k1], [libsecp256k1 >= 0.1.0.20],
[secp256k1_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libsecp256k1 >= 0.1.0.20" 2>/dev/null`"
secp256k1_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libsecp256k1 >= 0.1.0.20" 2>/dev/null`"],
[AC_MSG_ERROR([libsecp256k1 >= 0.1.0.20 is required but was not found.])])
AC_SUBST([secp256k1_PKG], ['libsecp256k1 >= 0.1.0.20'])
AC_SUBST([secp256k1_CPPFLAGS], [${secp256k1_CFLAGS}])
AS_IF([test x${secp256k1_INCLUDEDIR} != "x"],
[AC_SUBST([secp256k1_ISYS_CPPFLAGS], ["-isystem${secp256k1_INCLUDEDIR} ${secp256k1_OTHER_CFLAGS}"])],
[AC_SUBST([secp256k1_ISYS_CPPFLAGS], [${secp256k1_OTHER_CFLAGS}])])
AC_MSG_NOTICE([secp256k1_CPPFLAGS : ${secp256k1_CPPFLAGS}])
AC_MSG_NOTICE([secp256k1_ISYS_CPPFLAGS : ${secp256k1_ISYS_CPPFLAGS}])
AC_MSG_NOTICE([secp256k1_OTHER_CFLAGS : ${secp256k1_OTHER_CFLAGS}])
AC_MSG_NOTICE([secp256k1_INCLUDEDIR : ${secp256k1_INCLUDEDIR}])
AC_MSG_NOTICE([secp256k1_LIBS : ${secp256k1_LIBS}])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([secp256k1_BUILD_CPPFLAGS], [${secp256k1_ISYS_CPPFLAGS}])],
[AC_SUBST([secp256k1_BUILD_CPPFLAGS], [${secp256k1_CPPFLAGS}])])

AC_MSG_NOTICE([secp256k1_BUILD_CPPFLAGS : ${secp256k1_BUILD_CPPFLAGS}])


# Process outputs into templates.
#==============================================================================
AC_CONFIG_FILES([Makefile libbitcoin-consensus.pc])
Expand Down

0 comments on commit 96f39ad

Please sign in to comment.