From e5e314362ccb8132eb75cf02d2d91b104e741666 Mon Sep 17 00:00:00 2001 From: "jyong2.kim" Date: Wed, 18 May 2016 16:49:28 +0900 Subject: [PATCH] Updated SConscript of Notification service. gcc build option is changed to c type flag. gcov build option is added to measure code coverage. unused command line is deleted. warning is resolved in NSUtil.c Change-Id: I13a509ebccf44242cea3e036505fbe7905403f09 Signed-off-by: jyong2.kim Reviewed-on: https://gerrit.iotivity.org/gerrit/8211 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- service/notification/SConscript | 17 ++++++++++------- service/notification/src/common/NSUtil.c | 2 ++ service/notification/unittest/SConscript | 6 +----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/service/notification/SConscript b/service/notification/SConscript index 9319104..777c06f 100644 --- a/service/notification/SConscript +++ b/service/notification/SConscript @@ -62,7 +62,7 @@ notification_env.PrependUnique(LIBS = [ ]) if target_os not in ['windows', 'winrt']: - notification_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0']) + notification_env.AppendUnique(CCFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0']) if target_os not in ['darwin', 'ios', 'windows', 'winrt']: notification_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) @@ -71,14 +71,17 @@ if target_os == 'linux': notification_env.AppendUnique(LIBS = ['pthread']) if target_os == 'android': - notification_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) + notification_env.AppendUnique(CCFLAGS = ['-frtti', '-fexceptions']) notification_env.AppendUnique(LIBS = ['gnustl_shared','log']) notification_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libnotification_provider.so']) - if not env.get('RELEASE'): notification_env.AppendUnique(LIBS = ['log']) +if not env.get('RELEASE'): + notification_env.PrependUnique(LIBS = ['gcov']) + notification_env.AppendUnique(CCFLAGS = ['--coverage']) + ###################################################################### # Source files and Targets ###################################################################### @@ -112,10 +115,10 @@ consumersdk = notification_env.StaticLibrary('notification_consumer', notificati notification_env.InstallTarget(consumersdk, 'libnotification_consumer') notification_env.UserInstallTargetLib(consumersdk, 'libnotification_consumer') -#notification_env.UserInstallTargetHeader('include/NSProviderIngerface.h',\ -# 'service/notification', 'NSProviderIngerface.h') -#notification_env.UserInstallTargetHeader('include/NSConsumerIngerface.h',\ -# 'service/notification', 'NSConsumerIngerface.h') +notification_env.UserInstallTargetHeader('include/NSProviderIngerface.h',\ + 'service/notification', 'NSProviderInterface.h') +notification_env.UserInstallTargetHeader('include/NSConsumerIngerface.h',\ + 'service/notification', 'NSConsumerInterface.h') # Go to build Unit test if target_os == 'linux': diff --git a/service/notification/src/common/NSUtil.c b/service/notification/src/common/NSUtil.c index 0ddeaa9..3781d1c 100755 --- a/service/notification/src/common/NSUtil.c +++ b/service/notification/src/common/NSUtil.c @@ -20,6 +20,8 @@ #include "NSUtil.h" +#include "oic_malloc.h" + NSResult NSFreeMessage(NSMessage * obj) { if (!obj) diff --git a/service/notification/unittest/SConscript b/service/notification/unittest/SConscript index 2d8b990..3c77952 100644 --- a/service/notification/unittest/SConscript +++ b/service/notification/unittest/SConscript @@ -65,10 +65,6 @@ notification_test_env.AppendUnique(LIBS = ['pthread']) notification_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master', gtest_dir + '/include']) notification_test_env.AppendUnique(CPPPATH = ['../include']) -#if not env.get('RELEASE'): -# notification_test_env.PrependUnique(LIBS = ['gcov']) -# notification_test_env.AppendUnique(CXXFLAGS = ['--coverage']) - ###################################################################### # Build Test ###################################################################### @@ -93,4 +89,4 @@ if env.get('TEST') == '1': if target_os == 'linux': from tools.scons.RunTest import * run_test(notification_consumer_test_env, '', 'service/notification/unittest/notification_consumer_test') - #run_test(notification_provider_test_env, '', 'service/notification/unittest/notification_provider_test') \ No newline at end of file + run_test(notification_provider_test_env, '', 'service/notification/unittest/notification_provider_test') \ No newline at end of file -- 2.7.4