IOT-1583: Removing /W4 warning from resource/c_common.
[platform/upstream/iotivity.git] / resource / c_common / SConscript
index d2c1e95..e7b4a38 100644 (file)
@@ -128,13 +128,6 @@ env.AppendUnique(CPPPATH = [os.path.join(src_dir, 'resource', 'c_common')])
 
 ######################################################################
 
-######################################################################
-# Add platform-specific helper library
-######################################################################
-
-if target_os in ['windows', 'msys_nt']:
-       SConscript('windows/SConscript')
-
 env.AppendUnique(CPPPATH = [
             os.path.join(Dir('.').abspath, 'oic_malloc', 'include'),
             os.path.join(Dir('.').abspath, 'oic_string', 'include'),
@@ -154,6 +147,20 @@ if target_os in ['tizen', 'linux']:
 common_env = env.Clone()
 
 ######################################################################
+# Enable treating all warnings as errors
+######################################################################
+
+if target_os in ['windows', 'msys_nt']:
+       common_env.AppendUnique(CCFLAGS=['/W4', '/WX'])
+
+######################################################################
+# Add platform-specific helper library
+######################################################################
+
+if target_os in ['windows', 'msys_nt']:
+       SConscript('windows/SConscript', 'common_env')
+
+######################################################################
 # Source files and Targets
 ######################################################################
 common_src = [