diff options
-rw-r--r-- | .github/workflows/ci.yml | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rwxr-xr-x | configure.sh | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd6b65998..abd47ec97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,8 @@ jobs: run: | ${{ matrix.env }} ./configure.sh ${{ matrix.config }} \ --prefix=$(pwd)/build/install \ - --unit-testing + --unit-testing \ + --werror - name: Build run: make -j2 diff --git a/CMakeLists.txt b/CMakeLists.txt index c32c10f4d..b48974cc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,6 @@ include(Config${CMAKE_BUILD_TYPE}) add_check_c_cxx_flag("-O${OPTIMIZATION_LEVEL}") add_check_c_cxx_flag("-Wall") -add_check_c_cxx_flag("-Werror") add_check_c_cxx_flag("-Wno-unused-private-field") add_check_c_flag("-fexceptions") add_check_cxx_flag("-Wsuggest-override") diff --git a/configure.sh b/configure.sh index 419d66ea8..1e036e548 100755 --- a/configure.sh +++ b/configure.sh @@ -51,6 +51,7 @@ The following flags enable optional features (disable with --no-<option name>). --asan build with ASan instrumentation --ubsan build with UBSan instrumentation --tsan build with TSan instrumentation + --werror build with -Werror Optional Packages: The following flags enable optional packages (disable with --no-<option name>). @@ -150,6 +151,7 @@ ubsan=default unit_testing=default valgrind=default win64=default +werror=default abc_dir=default antlr_dir=default @@ -186,6 +188,8 @@ do --tsan) tsan=ON;; --no-tsan) tsan=OFF;; + --werror) werror=ON;; + --assertions) assertions=ON;; --no-assertions) assertions=OFF;; @@ -355,6 +359,11 @@ done #--------------------------------------------------------------------------# +if [ $werror != default ]; then + export CFLAGS=-Werror + export CXXFLAGS=-Werror +fi + cmake_opts="" [ $buildtype != default ] \ |