From 5c691f27f7e84aa7a462d91e4687237668bef037 Mon Sep 17 00:00:00 2001 From: Alastair Robertson Date: Mon, 22 May 2023 03:02:47 -0700 Subject: [PATCH] Enable -Werror for Clang builds in CI Don't enable for local dev builds or for GCC CI builds, as every compiler version has a different set of warnings and trying to make them all pass is a neverending task. --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 326b45f..3a88a06 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,7 @@ workflows: name: build-gcc cc: /usr/bin/gcc cxx: /usr/bin/g++ + warnings_as_errors: "OFF" - test: name: test-gcc requires: @@ -21,6 +22,7 @@ workflows: name: build-clang cc: /usr/bin/clang-12 cxx: /usr/bin/clang++-12 + warnings_as_errors: "ON" - test: name: test-clang requires: @@ -72,6 +74,8 @@ jobs: type: string cxx: type: string + warnings_as_errors: + type: string environment: CC: << parameters.cc >> CXX: << parameters.cxx >> @@ -115,7 +119,7 @@ jobs: - run: name: Build command: | - cmake -G Ninja -B build/ -DWITH_FLAKY_TESTS=Off -DCODE_COVERAGE=On + cmake -G Ninja -B build/ -DWITH_FLAKY_TESTS=Off -DCODE_COVERAGE=On -DWARNINGS_AS_ERRORS=<< parameters.warnings_as_errors >> cmake --build build/ # Testing rubbish: cp test/ci.oid.toml build/testing.oid.toml