build: Set AUTHOR_WARNING on warnings #33144

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2508-bld-warn-dev changing 1 files +1 −0
  1. maflcko commented at 2:27 pm on August 6, 2025: member

    Now that the cmake setting -Werror=dev is set since commit 6a13a6106e3c1ebe95ba6430184d6260a7b942bd for the CI, guix and the dev cmake preset, it could make sense to notify developers about any warnings.

    So do that with a single AUTHOR_WARNING.

    This can be tested by introducing a bug, like:

     0diff --git a/CMakeLists.txt b/CMakeLists.txt
     1index 6017775fa7..5610e03c66 100644
     2--- a/CMakeLists.txt
     3+++ b/CMakeLists.txt
     4@@ -589,7 +589,7 @@ set(Python3_FIND_FRAMEWORK LAST CACHE STRING "")
     5 # improves compatibility with Python version managers that use shims.
     6 set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "")
     7 mark_as_advanced(Python3_FIND_FRAMEWORK Python3_FIND_UNVERSIONED_NAMES)
     8-find_package(Python3 3.10 COMPONENTS Interpreter)
     9+find_package(Python3 3.210 COMPONENTS Interpreter)
    10 if(NOT TARGET Python3::Interpreter)
    11   list(APPEND configure_warnings
    12     "Minimum required Python not found."
    

    Fixes #31476.

  2. build: Set AUTHOR_WARNING on warnings fa6497ba71
  3. DrahtBot added the label Build system on Aug 6, 2025
  4. DrahtBot commented at 2:28 pm on August 6, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33144.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK l0rinc

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32865 (cmake: Use AUTHOR_WARNING for warnings by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. l0rinc commented at 6:45 pm on August 6, 2025: contributor

    Rebased, tested it with:

     0diff --git a/CMakeLists.txt b/CMakeLists.txt
     1--- a/CMakeLists.txt	(revision 27e4b8c6856194fa8db028b6f7356f83ea3d7e3a)
     2+++ b/CMakeLists.txt	(date 1754504896922)
     3@@ -186,6 +186,7 @@
     4 string(APPEND CMAKE_CXX_LINK_EXECUTABLE " ${APPEND_LDFLAGS}")
     5
     6 set(configure_warnings)
     7+list(APPEND configure_warnings "Testing [#33144](/bitcoin-bitcoin/33144/)")
     8
     9 include(CheckLinkerSupportsPIE)
    10 check_linker_supports_pie(configure_warnings)
    

    running:

    0rm -rfd build && cmake -B build 2>&1 | grep -C1 Warning
    

    Prints before the change:

    0CMake Warning at CMakeLists.txt:709 (message):
    1  Testing [#33144](/bitcoin-bitcoin/33144/)
    

    After the change:

    0CMake Warning at CMakeLists.txt:709 (message):
    1  Testing [#33144](/bitcoin-bitcoin/33144/)
    2--
    3
    4CMake Warning (dev) at CMakeLists.txt:712 (message):
    5  Warnings have been encountered!
    6This warning is for project developers.  Use -Wno-dev to suppress it.
    

    ACK fa6497ba71e9573d341c1c051af09b3ec2fc8d74


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-08-13 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me