mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
Merge caa61b5c7a
into 66aa6a47bd
This commit is contained in:
commit
97f67fdc51
6 changed files with 37 additions and 20 deletions
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -165,10 +165,13 @@ jobs:
|
|||
include:
|
||||
- job-type: standard
|
||||
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
|
||||
job-name: 'Win64 native, VS 2022'
|
||||
job-name: 'Win64 native, MSVC'
|
||||
- job-type: clang-cl
|
||||
generate-options: '-T ClangCL -DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON'
|
||||
job-name: 'Win64 native, clang-cl'
|
||||
- job-type: fuzz
|
||||
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
|
||||
job-name: 'Win64 native fuzz, VS 2022'
|
||||
generate-options: '-T ClangCL -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON'
|
||||
job-name: 'Win64 native, fuzz, clang-cl'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -225,13 +228,13 @@ jobs:
|
|||
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release
|
||||
|
||||
- name: Run test suite
|
||||
if: matrix.job-type == 'standard'
|
||||
if: matrix.job-type != 'fuzz'
|
||||
working-directory: build
|
||||
run: |
|
||||
ctest --output-on-failure --stop-on-failure -j $env:NUMBER_OF_PROCESSORS -C Release
|
||||
|
||||
- name: Run functional tests
|
||||
if: matrix.job-type == 'standard'
|
||||
if: matrix.job-type != 'fuzz'
|
||||
working-directory: build
|
||||
env:
|
||||
BITCOIND: '${{ github.workspace }}\build\src\Release\bitcoind.exe'
|
||||
|
|
|
@ -395,18 +395,22 @@ include(cmake/ccache.cmake)
|
|||
add_library(warn_interface INTERFACE)
|
||||
target_link_libraries(core_interface INTERFACE warn_interface)
|
||||
if(MSVC)
|
||||
# For both cl and clang-cl compilers.
|
||||
try_append_cxx_flags("/W3" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4018" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4244" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4267" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4715" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4805" TARGET warn_interface SKIP_LINK)
|
||||
target_compile_definitions(warn_interface INTERFACE
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||
)
|
||||
else()
|
||||
try_append_cxx_flags("-Wall" TARGET warn_interface SKIP_LINK)
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
try_append_cxx_flags("/wd4018" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4244" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4267" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4715" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("/wd4805" TARGET warn_interface SKIP_LINK)
|
||||
else()
|
||||
try_append_cxx_flags("-Wextra" TARGET warn_interface SKIP_LINK)
|
||||
try_append_cxx_flags("-Wgnu" TARGET warn_interface SKIP_LINK)
|
||||
# Some compilers will ignore -Wformat-security without -Wformat, so just combine the two here.
|
||||
|
|
|
@ -81,12 +81,14 @@ target_include_directories(leveldb
|
|||
|
||||
add_library(nowarn_leveldb_interface INTERFACE)
|
||||
if(MSVC)
|
||||
target_compile_options(nowarn_leveldb_interface INTERFACE
|
||||
/wd4722
|
||||
)
|
||||
target_compile_definitions(nowarn_leveldb_interface INTERFACE
|
||||
_CRT_NONSTDC_NO_WARNINGS
|
||||
)
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
target_compile_options(nowarn_leveldb_interface INTERFACE
|
||||
/wd4722
|
||||
)
|
||||
else()
|
||||
target_compile_options(nowarn_leveldb_interface INTERFACE
|
||||
-Wno-conditional-uninitialized
|
||||
|
|
|
@ -120,7 +120,11 @@ function(try_append_cxx_flags flags)
|
|||
endfunction()
|
||||
|
||||
if(MSVC)
|
||||
try_append_cxx_flags("/WX /options:strict" VAR working_compiler_werror_flag SKIP_LINK)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
try_append_cxx_flags("/WX /options:strict" VAR working_compiler_werror_flag SKIP_LINK)
|
||||
else()
|
||||
try_append_cxx_flags("/WX" VAR working_compiler_werror_flag SKIP_LINK)
|
||||
endif()
|
||||
else()
|
||||
try_append_cxx_flags("-Werror" VAR working_compiler_werror_flag SKIP_LINK)
|
||||
endif()
|
||||
|
|
|
@ -242,17 +242,21 @@ endif()
|
|||
|
||||
include(TryAppendCFlags)
|
||||
if(MSVC)
|
||||
# Keep the following commands ordered lexicographically.
|
||||
# For both cl and clang-cl compilers.
|
||||
try_append_c_flags(/W3) # Production quality warning level.
|
||||
try_append_c_flags(/wd4146) # Disable warning C4146 "unary minus operator applied to unsigned type, result still unsigned".
|
||||
try_append_c_flags(/wd4244) # Disable warning C4244 "'conversion' conversion from 'type1' to 'type2', possible loss of data".
|
||||
try_append_c_flags(/wd4267) # Disable warning C4267 "'var' : conversion from 'size_t' to 'type', possible loss of data".
|
||||
# Eliminate deprecation warnings for the older, less secure functions.
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
else()
|
||||
try_append_c_flags(-Wall) # GCC >= 2.95 and probably many other compilers.
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
# Keep the following commands ordered lexicographically.
|
||||
try_append_c_flags(/wd4146) # Disable warning C4146 "unary minus operator applied to unsigned type, result still unsigned".
|
||||
try_append_c_flags(/wd4244) # Disable warning C4244 "'conversion' conversion from 'type1' to 'type2', possible loss of data".
|
||||
try_append_c_flags(/wd4267) # Disable warning C4267 "'var' : conversion from 'size_t' to 'type', possible loss of data".
|
||||
else()
|
||||
# Keep the following commands ordered lexicographically.
|
||||
try_append_c_flags(-pedantic)
|
||||
try_append_c_flags(-Wall) # GCC >= 2.95 and probably many other compilers.
|
||||
try_append_c_flags(-Wcast-align) # GCC >= 2.95.
|
||||
try_append_c_flags(-Wcast-align=strict) # GCC >= 8.0.
|
||||
try_append_c_flags(-Wconditional-uninitialized) # Clang >= 3.0 only.
|
||||
|
|
|
@ -127,7 +127,7 @@ add_executable(fuzz
|
|||
# Visual Studio 2022 version 17.12 introduced a bug
|
||||
# that causes an internal compiler error.
|
||||
# See: https://github.com/bitcoin/bitcoin/issues/31303
|
||||
$<$<VERSION_LESS:${MSVC_VERSION},1942>:utxo_snapshot.cpp>
|
||||
$<$<NOT:$<AND:$<CXX_COMPILER_ID:MSVC>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,19.42>>>:utxo_snapshot.cpp>
|
||||
utxo_total_supply.cpp
|
||||
validation_load_mempool.cpp
|
||||
vecdeque.cpp
|
||||
|
|
Loading…
Reference in a new issue