Skip to content

Commit

Permalink
Made -Werror optional.
Browse files Browse the repository at this point in the history
It is off by default so that it will not block mass tests of new GCC
but we want to enable it in a side repo
to be able to fix newly detected problems relatively early.

Enable with
    osc build --with werror
or
    rake osc:build"[--with werror]"
  • Loading branch information
mvidner committed Feb 2, 2016
1 parent 0e819da commit 2d751e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion configure.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ AC_PROG_CXX
# gnu++0x instead of c++0x so that
# we do not lose gnu extensions like typeof
# FIXME: rename to Y2CORE_CXXFLAGS and change in devtools:y2autoconf
Y2CORE_CFLAGS="-std=gnu++0x -Werror"
Y2CORE_CFLAGS="-std=gnu++0x"
AC_SUBST(Y2CORE_CFLAGS) dnl included in CXXFLAGS in YAST2-CHECKS-PROGRAM

AC_CHECK_HEADERS(xcrypt.h)
Expand Down
11 changes: 11 additions & 0 deletions package/yast2-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
#


# Optionally treat C/C++ warnings as errors.
# It is off by default so that it will not block mass tests of new GCC
# but we want to enable it in a side repo
# to be able to fix newly detected problems relatively early.
%bcond_with werror

Name: yast2-core
Version: 3.1.20
Release: 0
Expand Down Expand Up @@ -92,6 +98,11 @@ sed -i SUBDIRS -e 's/autodocs//'

export SUSE_ASNEEDED=0 # disable --as-needed until this package is fixed

%if %{with werror}
export CFLAGS="${RPM_OPT_FLAGS} -Werror"
export CXXFLAGS="${RPM_OPT_FLAGS} -Werror"
%endif

%yast_build

%install
Expand Down

0 comments on commit 2d751e3

Please sign in to comment.