service: Removing redundant env configuration 45/21945/7
authorPawel Winogrodzki <pawelwi@microsoft.com>
Tue, 15 Aug 2017 21:40:29 +0000 (14:40 -0700)
committerMats Wichmann <mats@linux.com>
Tue, 10 Oct 2017 11:37:22 +0000 (11:37 +0000)
Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I9af112e943a9b31792ec40191efc6e248871532b
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
service/coap-http-proxy/unittests/SConscript
service/resource-container/unittests/SConscript
service/scene-manager/unittests/SConscript

index 6d73c86..efca693 100644 (file)
@@ -31,13 +31,9 @@ CoAP_test_env = gtest_env.Clone()
 
 if CoAP_test_env.get('RELEASE'):
     CoAP_test_env.AppendUnique(CCFLAGS=['-Os'])
-    CoAP_test_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
     CoAP_test_env.AppendUnique(CCFLAGS=['-g'])
 
-if CoAP_test_env.get('LOGGING'):
-    CoAP_test_env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
 #SConscript('#service/third_party_libs.scons', 'lib_env')
 
 ######################################################################
@@ -50,7 +46,6 @@ target_os = CoAP_test_env.get('TARGET_OS')
 # Build flags 'coap_http_proxy','oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap', 'cjson'])
 ######################################################################
 
-CoAP_test_env.AppendUnique(LIBPATH=[CoAP_test_env.get('BUILD_DIR')])
 CoAP_test_env.AppendUnique(LIBS=[
     'coap_http_proxy',
     'octbstack',
@@ -70,7 +65,11 @@ if not CoAP_test_env.get('RELEASE'):
 CoAP_test_env.AppendUnique(CPPPATH=[
     '#/extlibs/hippomocks/hippomocks',
     '../include',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
     '#/resource/csdk/include',
+    '#/resource/csdk/logger/include',
     '#/resource/csdk/stack/include',
     '#/resource/csdk/connectivity/common/inc/',
     '#/resource/csdk/connectivity/lib/libcoap-4.1.1',
index 4b0581d..2da3c9a 100644 (file)
@@ -49,16 +49,12 @@ lib_env.AddMethod(filtered_glob, "FilteredGlob")
 
 if lib_env.get('RELEASE'):
     lib_env.AppendUnique(CCFLAGS=['-Os'])
-    lib_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
     lib_env.AppendUnique(CCFLAGS=['-g'])
 
-if lib_env.get('LOGGING'):
-    lib_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
 # Add third party libraries
 SConscript(src_dir + '/service/third_party_libs.scons', 'lib_env')
-
 container_gtest_env = lib_env.Clone()
 
 if int(containerJavaSupport):
@@ -86,15 +82,18 @@ if int(containerJavaSupport):
 ######################################################################
 container_gtest_env.AppendUnique(CPPPATH=[
     '#/extlibs',
-    '../include',
-    '../../resource-encapsulation/include',
-    '../../resource-encapsulation/src/common/utils/include',
-    '../bundle-api/include',
-    '../src',
+    '#/service/resource-container/include',
+    '#/service/resource-encapsulation/include',
+    '#/service/resource-encapsulation/src/common/utils/include',
+    '#/service/resource-container/bundle-api/include',
+    '#/service/resource-container/src',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
     '#/resource/include',
     '#/resource/csdk/include',
     '#/resource/csdk/stack/include',
-    '#/resource/oc_logger/include'
+    '#/resource/oc_logger/include',
 ])
 
 if int(containerJavaSupport):
index 7567e71..eeb9ff2 100644 (file)
@@ -32,13 +32,9 @@ lib_env = gtest_env.Clone()
 
 if lib_env.get('RELEASE'):
     lib_env.AppendUnique(CCFLAGS=['-Os'])
-    lib_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
     lib_env.AppendUnique(CCFLAGS=['-g'])
 
-if lib_env.get('LOGGING'):
-    lib_env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
 SConscript('#service/third_party_libs.scons', 'lib_env')
 
 ######################################################################
@@ -53,7 +49,6 @@ target_os = scene_test_env.get('TARGET_OS')
 # Build flags
 ######################################################################
 
-scene_test_env.AppendUnique(LIBPATH=[lib_env.get('BUILD_DIR')])
 scene_test_env.AppendUnique(LIBS=[
     'scene_manager',
     'rcs_server',
@@ -81,6 +76,9 @@ scene_test_env.PrependUnique(CPPPATH=[
     '#/service/resource-encapsulation/include',
     '#/service/resource-encapsulation/src/common/primitiveResource/include',
     '#/service/resource-encapsulation/src/common/utils/include',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
     '#/resource/csdk/security/include',
     '#/resource/csdk/include',
     '#/resource/csdk/stack/include',