]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
spec: Use --enable-werror on RHEL
authorJiri Denemark <jdenemar@redhat.com>
Tue, 30 Jul 2013 14:01:11 +0000 (16:01 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 30 Jul 2013 15:05:44 +0000 (17:05 +0200)
As RHEL provides a stable tool chain, we don't have to worry about
frequent changes in reported compiler warnings (which prevents us from
enabling -Werror unconditionally).

libvirt.spec.in

index 07fd036a7d96c0bdff92477f6f7b5f58e44a834e..156146296e79c14b1e4061134d13fae4052319ea 100644 (file)
 %endif
 
 
+# RHEL releases provide stable tool chains and so it is safe to turn
+# compiler warning into errors without being worried about frequent
+# changes in reported warnings
+%if 0%{?rhel}
+    %define enable_werror --enable-werror
+%endif
+
+
 Summary: Library providing a simple virtualization API
 Name: libvirt
 Version: @VERSION@
@@ -1397,6 +1405,7 @@ of recent versions of Linux (and other OSes).
            %{with_packager_version} \
            --with-qemu-user=%{qemu_user} \
            --with-qemu-group=%{qemu_group} \
+           %{?enable_werror} \
            %{init_scripts}
 make %{?_smp_mflags}
 gzip -9 ChangeLog