heimdal_build: Do not allow warnings in the heimdal code!
[samba.git] / source4 / heimdal_build / wscript_build
index d07b147610a51ba4553b2ec3486c83534f7a0060..a3733000f6e6543a7f011fe56d91eb8904eb7395 100644 (file)
@@ -287,11 +287,20 @@ def HEIMDAL_SUBSYSTEM(modname, source,
 
     bld.set_group(group)
 
+    # If we found the -Wno-error options we need then build without
+    # allowing warnings, otherwise permit them
+    if bld.env.enable_heimdal_warnings:
+        samba_cflags = CURRENT_CFLAGS(bld, modname, cflags) + \
+                       bld.env.HEIMDAL_PICKY_CFLAGS
+    else:
+        samba_cflags = CURRENT_CFLAGS(bld, modname, cflags,
+                                      allow_warnings=True)
+
     return bld(
         features       = 'c',
         source         = source,
         target         = modname,
-        samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags, allow_warnings=True),
+        samba_cflags   = samba_cflags,
         depends_on     = '',
         samba_deps     = to_list(deps),
         samba_includes = includes,