Skip to content

Commit 6a13a61

Browse files
committed
Merge bitcoin/bitcoin#32937: Enable -Werror=dev in CI & Guix
8f766f3 ci: enable -Werror=dev (fanquake) 7b420ca guix: configure with -Werror=dev (fanquake) 44097dd cmake: enable -Werror=dev in dev-mode preset (fanquake) Pull request description: Pass `-Werror=dev` in the CI, Guix and the `dev-mode` preset. https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-Werror: > Make developer warnings errors. > Make warnings that are meant for the author of the CMakeLists.txt files errors. By default this will also turn on deprecated warnings as errors. Pulled out of #32865. ACKs for top commit: Sjors: re-ACK 8f766f3 hebasto: ACK 8f766f3, tested on Ubuntu 24.04. Tree-SHA512: 0fa321b77d2519b5249d90590664c4e5938ac86209b068658647adf97ab55ea4d54c913aae2f622385fe2f41d7c851cd5d7371905fdad38b66cb124371e16ac7
2 parents 23e15d4 + 8f766f3 commit 6a13a61

File tree

5 files changed

+5
-2
lines changed

5 files changed

+5
-2
lines changed

.github/ci-test-each-commit-exec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def main():
2727
"cmake",
2828
"-B",
2929
"build",
30+
"-Werror=dev",
3031
"-DCMAKE_C_COMPILER=clang",
3132
"-DCMAKE_CXX_COMPILER=clang++",
3233
"-DWERROR=ON",

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223

224224
- name: Generate build system
225225
run: |
226-
cmake -B build --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
226+
cmake -B build -Werror=dev --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
227227
228228
- name: Save vcpkg binary cache
229229
uses: actions/cache/save@v4

CMakePresets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"name": "dev-mode",
6363
"displayName": "Developer mode, with all features/dependencies enabled",
6464
"binaryDir": "${sourceDir}/build_dev_mode",
65+
"errors": {"dev": true},
6566
"cacheVariables": {
6667
"BUILD_BENCH": "ON",
6768
"BUILD_CLI": "ON",

ci/test/03_test_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
118118
mkdir -p "${BASE_BUILD_DIR}"
119119
cd "${BASE_BUILD_DIR}"
120120

121-
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR"
121+
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev"
122122

123123
if [[ "${RUN_TIDY}" == "true" ]]; then
124124
BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"

contrib/guix/libexec/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ mkdir -p "$DISTSRC"
242242
cmake -S . -B build \
243243
--toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \
244244
-DWITH_CCACHE=OFF \
245+
-Werror=dev \
245246
${CONFIGFLAGS}
246247

247248
# Build Bitcoin Core

0 commit comments

Comments
 (0)