IOT-2966 Do not use -Werror by default 63/23963/2
authorGeorge Nash <george.nash@intel.com>
Fri, 19 Jan 2018 19:52:36 +0000 (11:52 -0800)
committerGeorge Nash <george.nash@intel.com>
Fri, 19 Jan 2018 20:01:03 +0000 (12:01 -0800)
Turning on the ERROR_ON_WARN has caused issues for
developers building the code on untested compilers.

We still want the build system to reject new warnings
but we don't want to preven developers from building
on their own system.

Bug: https://jira.iotivity.org/browse/IOT-2966
Change-Id: I69e9d52185db37d283645ee2fb41e39f288a38ef
Signed-off-by: George Nash <george.nash@intel.com>
auto_build.py
build_common/SConscript

index be19076..cfdfc7d 100755 (executable)
@@ -79,6 +79,7 @@ def build_linux_unsecured(flag, extra_option_str):
     build_options = {
                         'RELEASE':flag,
                         'SECURED':0,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -88,6 +89,7 @@ def build_linux_secured_with_tcp(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_TCP': 1,
                         'WITH_CLOUD':1,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -97,6 +99,7 @@ def build_linux_unsecured_with_java(flag, extra_option_str):
                         'RELEASE':flag,
                         'BUILD_JAVA': 1,
                         'TARGET_TRANSPORT': 'IP',
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -107,6 +110,7 @@ def build_linux_secured_with_java(flag, extra_option_str):
                         'BUILD_JAVA': 1,
                         'TARGET_TRANSPORT': 'IP',
                         'SECURED': 1,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -117,6 +121,7 @@ def build_linux_unsecured_with_tcp(flag, extra_option_str):
                         'WITH_TCP': 1,
                         'TARGET_TRANSPORT': 'IP',
                         'SECURED':0,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -126,6 +131,7 @@ def build_linux_unsecured_with_rm(flag, extra_option_str):
                         'ROUTING':'GW',
                         'RELEASE':flag,
                         'SECURED':0,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -133,6 +139,7 @@ def build_linux_secured(flag, extra_option_str):
     print ("*********** Build for linux with Security *************")
     build_options = {
                         'RELEASE':flag,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -146,6 +153,7 @@ def build_linux_full(flag, extra_option_str):
                         'WITH_RA':1,
                         'WITH_RA_IBB':1,
                         'WITH_TCP':1,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -155,6 +163,7 @@ def build_linux_unsecured_with_rd(flag, extra_option_str):
                         'RELEASE':flag,
                         'RD_MODE':'all',
                         'SECURED':0,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -163,6 +172,7 @@ def build_linux_secured_with_rd(flag, extra_option_str):
     build_options = {
                         'RELEASE':flag,
                         'RD_MODE':'all',
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -172,6 +182,7 @@ def build_linux_unsecured_with_mq(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_MQ':'PUB,SUB,BROKER',
                         'SECURED':0,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
@@ -181,6 +192,7 @@ def build_linux_unsecured_with_tcp(flag, extra_option_str):
                         'RELEASE':flag,
                         'WITH_TCP':'1',
                         'SECURED':0,
+                        'ERROR_ON_WARN':1,
                     }
     call_scons(build_options, extra_option_str)
 
index e17cbbd..415c486 100755 (executable)
@@ -245,7 +245,7 @@ if target_os in ['linux']:
     help_vars.Add(
         BoolVariable('ERROR_ON_WARN',
                      'Make all compiler warnings into errors.',
-                      default=True))
+                      default=False))
 
 if target_os == 'windows':
     # Builds differ based on Visual Studio version