Skip to content

Commit 06fdb5e

Browse files
authored
Merge pull request #252 from pmienk/master
Regenerate artifacts.
2 parents d3a3059 + 7fcc45e commit 06fdb5e

File tree

3 files changed

+144
-84
lines changed

3 files changed

+144
-84
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ jobs:
149149
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV
150150
fi
151151
152+
- name: Display CPU details
153+
if: ${{ (runner.os == 'Linux') }}
154+
shell: bash
155+
run: |
156+
lscpu
157+
152158
- name: Execute install.sh
153159
run: >
154160
./install.sh
@@ -207,11 +213,11 @@ jobs:
207213
run: |
208214
cat ${{ github.workspace }}/build/build-*/bootstrap.log
209215
216+
210217
- name: Failure display otool output
211218
if: ${{ failure() && (matrix.os == 'macos-latest') }}
212219
run: |
213220
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-protocol-test
214-
215221
- name: Failure display DYLD_PRINT_LIBRARIES
216222
if: ${{ failure() && (matrix.os == 'macos-latest') }}
217223
run: |
@@ -365,6 +371,12 @@ jobs:
365371
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV
366372
fi
367373
374+
- name: Display CPU details
375+
if: ${{ (runner.os == 'Linux') }}
376+
shell: bash
377+
run: |
378+
lscpu
379+
368380
- name: Execute install-cmake.sh
369381
run: >
370382
./install-cmake.sh
@@ -422,11 +434,11 @@ jobs:
422434
run: |
423435
cat ${{ github.workspace }}/build/build-*/bootstrap.log
424436
437+
425438
- name: Failure display otool output
426439
if: ${{ failure() && (matrix.os == 'macos-latest') }}
427440
run: |
428441
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-protocol-test
429-
430442
- name: Failure display DYLD_PRINT_LIBRARIES
431443
if: ${{ failure() && (matrix.os == 'macos-latest') }}
432444
run: |
@@ -551,6 +563,12 @@ jobs:
551563
echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV
552564
fi
553565
566+
- name: Display CPU details
567+
if: ${{ (runner.os == 'Linux') }}
568+
shell: bash
569+
run: |
570+
lscpu
571+
554572
- name: Execute install-cmakepresets.sh
555573
run: >
556574
./install-cmakepresets.sh
@@ -609,11 +627,11 @@ jobs:
609627
run: |
610628
cat ${{ github.workspace }}/build/build-*/bootstrap.log
611629
630+
612631
- name: Failure display otool output
613632
if: ${{ failure() && (matrix.os == 'macos-latest') }}
614633
run: |
615634
otool -L ${{ github.workspace }}/test/.libs/libbitcoin-protocol-test
616-
617635
- name: Failure display DYLD_PRINT_LIBRARIES
618636
if: ${{ failure() && (matrix.os == 'macos-latest') }}
619637
run: |

builds/cmake/CMakeLists.txt

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ enable_testing()
1616
list( APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules" )
1717
include(CheckIncludeFiles)
1818
include(CheckSymbolExists)
19+
include(CheckCXXCompilerFlag)
20+
include(CheckCXXSourceCompiles)
1921

2022
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
2123

@@ -40,29 +42,69 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
4042
# Add compiler options
4143
#------------------------------------------------------------------------------
4244
# Warn on all stuff.
43-
add_compile_options( "-Wall" )
45+
check_cxx_compiler_flag( "-Wall" HAS_FLAG_WALL )
46+
if ( HAS_FLAG_WALL )
47+
add_compile_options( "-Wall" )
48+
else()
49+
message( FATAL_ERROR "Compiler does not support -Wall" )
50+
endif()
4451

4552
# Warn on extra stuff.
46-
add_compile_options( "-Wextra" )
53+
check_cxx_compiler_flag( "-Wextra" HAS_FLAG_WEXTRA )
54+
if ( HAS_FLAG_WEXTRA )
55+
add_compile_options( "-Wextra" )
56+
else()
57+
message( FATAL_ERROR "Compiler does not support -Wextra" )
58+
endif()
4759

4860
# Disallow warning on style order of declarations.
49-
add_compile_options( "-Wno-reorder" )
61+
check_cxx_compiler_flag( "-Wno-reorder" HAS_FLAG_WNO-REORDER )
62+
if ( HAS_FLAG_WNO-REORDER )
63+
add_compile_options( "-Wno-reorder" )
64+
else()
65+
message( FATAL_ERROR "Compiler does not support -Wno-reorder" )
66+
endif()
5067

5168
# Suppress warning for incomplete field initialization.
52-
add_compile_options( "-Wno-missing-field-initializers" )
69+
check_cxx_compiler_flag( "-Wno-missing-field-initializers" HAS_FLAG_WNO-MISSING-FIELD-INITIALIZERS )
70+
if ( HAS_FLAG_WNO-MISSING-FIELD-INITIALIZERS )
71+
add_compile_options( "-Wno-missing-field-initializers" )
72+
else()
73+
message( FATAL_ERROR "Compiler does not support -Wno-missing-field-initializers" )
74+
endif()
5375

5476
# Conform to style.
55-
add_compile_options( "-Wno-missing-braces" )
77+
check_cxx_compiler_flag( "-Wno-missing-braces" HAS_FLAG_WNO-MISSING-BRACES )
78+
if ( HAS_FLAG_WNO-MISSING-BRACES )
79+
add_compile_options( "-Wno-missing-braces" )
80+
else()
81+
message( FATAL_ERROR "Compiler does not support -Wno-missing-braces" )
82+
endif()
5683

5784
# Ignore comments within comments or commenting of backslash extended lines.
58-
add_compile_options( "-Wno-comment" )
85+
check_cxx_compiler_flag( "-Wno-comment" HAS_FLAG_WNO-COMMENT )
86+
if ( HAS_FLAG_WNO-COMMENT )
87+
add_compile_options( "-Wno-comment" )
88+
else()
89+
message( FATAL_ERROR "Compiler does not support -Wno-comment" )
90+
endif()
5991

6092
# Suppress warning for copy of implicitly generated copy constructor.
61-
add_compile_options( "-Wno-deprecated-copy" )
93+
check_cxx_compiler_flag( "-Wno-deprecated-copy" HAS_FLAG_WNO-DEPRECATED-COPY )
94+
if ( HAS_FLAG_WNO-DEPRECATED-COPY )
95+
add_compile_options( "-Wno-deprecated-copy" )
96+
else()
97+
message( FATAL_ERROR "Compiler does not support -Wno-deprecated-copy" )
98+
endif()
6299

63100
# Conflict in stdlib under clang.
64101
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
65-
add_compile_options( "-Wno-mismatched-tags" )
102+
check_cxx_compiler_flag( "-Wno-mismatched-tags" HAS_FLAG_WNO-MISMATCHED-TAGS )
103+
if ( HAS_FLAG_WNO-MISMATCHED-TAGS )
104+
add_compile_options( "-Wno-mismatched-tags" )
105+
else()
106+
message( FATAL_ERROR "Compiler does not support -Wno-mismatched-tags" )
107+
endif()
66108
endif()
67109

68110
# Implement -Dpkgconfigdir and output ${pkgconfigdir}.

configure.ac

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -124,79 +124,6 @@ AC_ARG_ENABLE([isystem],
124124
AC_MSG_RESULT([$enable_isystem])
125125

126126

127-
# Check dependencies.
128-
#==============================================================================
129-
# Require Boost of at least version 1.76.0 and output ${boost_CPPFLAGS/LDFLAGS}.
130-
#------------------------------------------------------------------------------
131-
AS_CASE([${CC}], [*],
132-
[AX_BOOST_BASE([1.76.0],
133-
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
134-
AC_SUBST([boost_ISYS_CPPFLAGS], [`echo ${BOOST_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`])
135-
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
136-
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
137-
AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}])
138-
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
139-
[AC_MSG_ERROR([Boost 1.76.0 or later is required but was not found.])])])
140-
141-
AS_CASE([${enable_isystem}],[yes],
142-
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])],
143-
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}])])
144-
145-
AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}])
146-
147-
AS_CASE([${with_tests}], [yes],
148-
[AX_BOOST_UNIT_TEST_FRAMEWORK
149-
AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}])
150-
AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}])],
151-
[AC_SUBST([boost_unit_test_framework_LIBS], [])])
152-
153-
# Require zmq of at least version 4.3.4 and output ${zmq_CPPFLAGS/LIBS/PKG}.
154-
#------------------------------------------------------------------------------
155-
PKG_CHECK_MODULES([zmq], [libzmq >= 4.3.4],
156-
[zmq_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libzmq >= 4.3.4" 2>/dev/null`"
157-
zmq_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libzmq >= 4.3.4" 2>/dev/null`"],
158-
[AC_MSG_ERROR([libzmq >= 4.3.4 is required but was not found.])])
159-
AC_SUBST([zmq_PKG], ['libzmq >= 4.3.4'])
160-
AC_SUBST([zmq_CPPFLAGS], [${zmq_CFLAGS}])
161-
AS_IF([test x${zmq_INCLUDEDIR} != "x"],
162-
[AC_SUBST([zmq_ISYS_CPPFLAGS], ["-isystem${zmq_INCLUDEDIR} ${zmq_OTHER_CFLAGS}"])],
163-
[AC_SUBST([zmq_ISYS_CPPFLAGS], [${zmq_OTHER_CFLAGS}])])
164-
AC_MSG_NOTICE([zmq_CPPFLAGS : ${zmq_CPPFLAGS}])
165-
AC_MSG_NOTICE([zmq_ISYS_CPPFLAGS : ${zmq_ISYS_CPPFLAGS}])
166-
AC_MSG_NOTICE([zmq_OTHER_CFLAGS : ${zmq_OTHER_CFLAGS}])
167-
AC_MSG_NOTICE([zmq_INCLUDEDIR : ${zmq_INCLUDEDIR}])
168-
AC_MSG_NOTICE([zmq_LIBS : ${zmq_LIBS}])
169-
170-
AS_CASE([${enable_isystem}],[yes],
171-
[AC_SUBST([zmq_BUILD_CPPFLAGS], [${zmq_ISYS_CPPFLAGS}])],
172-
[AC_SUBST([zmq_BUILD_CPPFLAGS], [${zmq_CPPFLAGS}])])
173-
174-
AC_MSG_NOTICE([zmq_BUILD_CPPFLAGS : ${zmq_BUILD_CPPFLAGS}])
175-
176-
# Require bitcoin-system of at least version 4.0.0 and output ${bitcoin_system_CPPFLAGS/LIBS/PKG}.
177-
#------------------------------------------------------------------------------
178-
PKG_CHECK_MODULES([bitcoin_system], [libbitcoin-system >= 4.0.0],
179-
[bitcoin_system_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libbitcoin-system >= 4.0.0" 2>/dev/null`"
180-
bitcoin_system_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libbitcoin-system >= 4.0.0" 2>/dev/null`"],
181-
[AC_MSG_ERROR([libbitcoin-system >= 4.0.0 is required but was not found.])])
182-
AC_SUBST([bitcoin_system_PKG], ['libbitcoin-system >= 4.0.0'])
183-
AC_SUBST([bitcoin_system_CPPFLAGS], [${bitcoin_system_CFLAGS}])
184-
AS_IF([test x${bitcoin_system_INCLUDEDIR} != "x"],
185-
[AC_SUBST([bitcoin_system_ISYS_CPPFLAGS], ["-isystem${bitcoin_system_INCLUDEDIR} ${bitcoin_system_OTHER_CFLAGS}"])],
186-
[AC_SUBST([bitcoin_system_ISYS_CPPFLAGS], [${bitcoin_system_OTHER_CFLAGS}])])
187-
AC_MSG_NOTICE([bitcoin_system_CPPFLAGS : ${bitcoin_system_CPPFLAGS}])
188-
AC_MSG_NOTICE([bitcoin_system_ISYS_CPPFLAGS : ${bitcoin_system_ISYS_CPPFLAGS}])
189-
AC_MSG_NOTICE([bitcoin_system_OTHER_CFLAGS : ${bitcoin_system_OTHER_CFLAGS}])
190-
AC_MSG_NOTICE([bitcoin_system_INCLUDEDIR : ${bitcoin_system_INCLUDEDIR}])
191-
AC_MSG_NOTICE([bitcoin_system_LIBS : ${bitcoin_system_LIBS}])
192-
193-
AS_CASE([${enable_isystem}],[yes],
194-
[AC_SUBST([bitcoin_system_BUILD_CPPFLAGS], [${bitcoin_system_ISYS_CPPFLAGS}])],
195-
[AC_SUBST([bitcoin_system_BUILD_CPPFLAGS], [${bitcoin_system_CPPFLAGS}])])
196-
197-
AC_MSG_NOTICE([bitcoin_system_BUILD_CPPFLAGS : ${bitcoin_system_BUILD_CPPFLAGS}])
198-
199-
200127
# Set flags.
201128
#==============================================================================
202129
# Require c++20 for all c++ products.
@@ -278,6 +205,79 @@ AS_CASE([${CC}], [*],
278205
[LDFLAGS="$LDFLAGS -fstack-protector-all"])])
279206

280207

208+
# Check dependencies.
209+
#==============================================================================
210+
# Require Boost of at least version 1.76.0 and output ${boost_CPPFLAGS/LDFLAGS}.
211+
#------------------------------------------------------------------------------
212+
AS_CASE([${CC}], [*],
213+
[AX_BOOST_BASE([1.76.0],
214+
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
215+
AC_SUBST([boost_ISYS_CPPFLAGS], [`echo ${BOOST_CPPFLAGS} | $SED s/^-I/-isystem/g | $SED s/' -I'/' -isystem'/g`])
216+
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
217+
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
218+
AC_MSG_NOTICE([boost_ISYS_CPPFLAGS : ${boost_ISYS_CPPFLAGS}])
219+
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
220+
[AC_MSG_ERROR([Boost 1.76.0 or later is required but was not found.])])])
221+
222+
AS_CASE([${enable_isystem}],[yes],
223+
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])],
224+
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}])])
225+
226+
AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}])
227+
228+
AS_CASE([${with_tests}], [yes],
229+
[AX_BOOST_UNIT_TEST_FRAMEWORK
230+
AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}])
231+
AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}])],
232+
[AC_SUBST([boost_unit_test_framework_LIBS], [])])
233+
234+
# Require zmq of at least version 4.3.4 and output ${zmq_CPPFLAGS/LIBS/PKG}.
235+
#------------------------------------------------------------------------------
236+
PKG_CHECK_MODULES([zmq], [libzmq >= 4.3.4],
237+
[zmq_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libzmq >= 4.3.4" 2>/dev/null`"
238+
zmq_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libzmq >= 4.3.4" 2>/dev/null`"],
239+
[AC_MSG_ERROR([libzmq >= 4.3.4 is required but was not found.])])
240+
AC_SUBST([zmq_PKG], ['libzmq >= 4.3.4'])
241+
AC_SUBST([zmq_CPPFLAGS], [${zmq_CFLAGS}])
242+
AS_IF([test x${zmq_INCLUDEDIR} != "x"],
243+
[AC_SUBST([zmq_ISYS_CPPFLAGS], ["-isystem${zmq_INCLUDEDIR} ${zmq_OTHER_CFLAGS}"])],
244+
[AC_SUBST([zmq_ISYS_CPPFLAGS], [${zmq_OTHER_CFLAGS}])])
245+
AC_MSG_NOTICE([zmq_CPPFLAGS : ${zmq_CPPFLAGS}])
246+
AC_MSG_NOTICE([zmq_ISYS_CPPFLAGS : ${zmq_ISYS_CPPFLAGS}])
247+
AC_MSG_NOTICE([zmq_OTHER_CFLAGS : ${zmq_OTHER_CFLAGS}])
248+
AC_MSG_NOTICE([zmq_INCLUDEDIR : ${zmq_INCLUDEDIR}])
249+
AC_MSG_NOTICE([zmq_LIBS : ${zmq_LIBS}])
250+
251+
AS_CASE([${enable_isystem}],[yes],
252+
[AC_SUBST([zmq_BUILD_CPPFLAGS], [${zmq_ISYS_CPPFLAGS}])],
253+
[AC_SUBST([zmq_BUILD_CPPFLAGS], [${zmq_CPPFLAGS}])])
254+
255+
AC_MSG_NOTICE([zmq_BUILD_CPPFLAGS : ${zmq_BUILD_CPPFLAGS}])
256+
257+
# Require bitcoin-system of at least version 4.0.0 and output ${bitcoin_system_CPPFLAGS/LIBS/PKG}.
258+
#------------------------------------------------------------------------------
259+
PKG_CHECK_MODULES([bitcoin_system], [libbitcoin-system >= 4.0.0],
260+
[bitcoin_system_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libbitcoin-system >= 4.0.0" 2>/dev/null`"
261+
bitcoin_system_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libbitcoin-system >= 4.0.0" 2>/dev/null`"],
262+
[AC_MSG_ERROR([libbitcoin-system >= 4.0.0 is required but was not found.])])
263+
AC_SUBST([bitcoin_system_PKG], ['libbitcoin-system >= 4.0.0'])
264+
AC_SUBST([bitcoin_system_CPPFLAGS], [${bitcoin_system_CFLAGS}])
265+
AS_IF([test x${bitcoin_system_INCLUDEDIR} != "x"],
266+
[AC_SUBST([bitcoin_system_ISYS_CPPFLAGS], ["-isystem${bitcoin_system_INCLUDEDIR} ${bitcoin_system_OTHER_CFLAGS}"])],
267+
[AC_SUBST([bitcoin_system_ISYS_CPPFLAGS], [${bitcoin_system_OTHER_CFLAGS}])])
268+
AC_MSG_NOTICE([bitcoin_system_CPPFLAGS : ${bitcoin_system_CPPFLAGS}])
269+
AC_MSG_NOTICE([bitcoin_system_ISYS_CPPFLAGS : ${bitcoin_system_ISYS_CPPFLAGS}])
270+
AC_MSG_NOTICE([bitcoin_system_OTHER_CFLAGS : ${bitcoin_system_OTHER_CFLAGS}])
271+
AC_MSG_NOTICE([bitcoin_system_INCLUDEDIR : ${bitcoin_system_INCLUDEDIR}])
272+
AC_MSG_NOTICE([bitcoin_system_LIBS : ${bitcoin_system_LIBS}])
273+
274+
AS_CASE([${enable_isystem}],[yes],
275+
[AC_SUBST([bitcoin_system_BUILD_CPPFLAGS], [${bitcoin_system_ISYS_CPPFLAGS}])],
276+
[AC_SUBST([bitcoin_system_BUILD_CPPFLAGS], [${bitcoin_system_CPPFLAGS}])])
277+
278+
AC_MSG_NOTICE([bitcoin_system_BUILD_CPPFLAGS : ${bitcoin_system_BUILD_CPPFLAGS}])
279+
280+
281281
# Process outputs into templates.
282282
#==============================================================================
283283
AC_CONFIG_FILES([Makefile libbitcoin-protocol.pc])

0 commit comments

Comments
 (0)