From 1484a56df7ed2509cebdc99ec1f908489482a30e Mon Sep 17 00:00:00 2001 From: George Nash Date: Fri, 19 Jan 2018 11:52:36 -0800 Subject: [PATCH] IOT-2966 Do not use -Werror by default 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 --- auto_build.py | 12 ++++++++++++ build_common/SConscript | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/auto_build.py b/auto_build.py index be190768cf..cfdfc7df7f 100755 --- a/auto_build.py +++ b/auto_build.py @@ -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) diff --git a/build_common/SConscript b/build_common/SConscript index e17cbbdff4..415c48614f 100755 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -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 -- GitLab