Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make -Werror optional #105

Merged
merged 2 commits into from
Feb 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
6 changes: 6 additions & 0 deletions package/yast2-core.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 2 15:15:39 UTC 2016 - mvidner@suse.com

- Treat C/C++ warnings as errors but only via bcond_with werror.
- 3.1.21

-------------------------------------------------------------------
Tue Feb 2 12:17:32 UTC 2016 - mvidner@suse.com

Expand Down
13 changes: 12 additions & 1 deletion package/yast2-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@
#


# 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
Version: 3.1.21
Release: 0
Url: https://github.com/yast/yast-core

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