easy-setup: Drop unnecessary gtest flags 83/19283/12
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 26 Apr 2017 10:50:15 +0000 (12:50 +0200)
committerPhil Coval <philippe.coval@osg.samsung.com>
Thu, 29 Jun 2017 22:35:13 +0000 (22:35 +0000)
This will help for upgrading gtest to latest release
.
Ported from 1.3-rel to master

Conflicts:
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/mediator/richsdk/unittests/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ic807bfcd7356aa807671e0b378fcda2a558c24b2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20239
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19283
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/mediator/richsdk/unittests/SConscript

index 7c967a9..c46ca21 100644 (file)
@@ -44,7 +44,6 @@ SConscript('#service/third_party_libs.scons', 'lib_env')
 #unit test setting
 ######################################################################
 src_dir = lib_env.get('SRC_DIR')
-gtest_dir = src_dir + '/extlibs/gtest/googletest-release-1.7.0'
 
 easysetup_test_env = lib_env.Clone()
 target_os = env.get('TARGET_OS')
@@ -52,9 +51,6 @@ target_os = env.get('TARGET_OS')
 ######################################################################
 # Build flags
 ######################################################################
-GTest = File(gtest_dir + '/lib/.libs/libgtest.a')
-GTest_Main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
-
 easysetup_test_env.AppendUnique(LIBPATH=[lib_env.get('BUILD_DIR')])
 easysetup_test_env.PrependUnique(LIBS=[
     'connectivity_abstraction',
@@ -62,8 +58,6 @@ easysetup_test_env.PrependUnique(LIBS=[
     'octbstack',
     'oc_logger',
     'coap',
-    GTest_Main,
-    GTest
 ])
 
 if target_os not in ['windows', 'winrt']:
@@ -74,10 +68,13 @@ easysetup_test_env.AppendUnique(CXXFLAGS=['-pthread'])
 easysetup_test_env.AppendUnique(LIBS=['pthread'])
 
 easysetup_test_env.PrependUnique(CPPPATH=[
-    '#/extlibs/hippomocks/hippomocks', gtest_dir + '/include',
-    '#/resource/include', '#/resource/csdk/connectivity/api',
-    '#/resource/csdk/stack/include', '#/resource/csdk/include',
-    '#/resource/oc_logger/include', '#/service/easy-setup/inc',
+    '#/extlibs/hippomocks/hippomocks',
+    '#/resource/include',
+    '#/resource/csdk/connectivity/api',
+    '#/resource/csdk/stack/include',
+    '#/resource/csdk/include',
+    '#/resource/oc_logger/include',
+    '#/service/easy-setup/inc',
     '#/service/easy-setup/enrollee/inc',
     '#/service/easy-setup/mediator/richsdk/inc'
 ])
index 658e3ee..096085b 100644 (file)
@@ -35,14 +35,13 @@ else:
 if env.get('LOGGING'):
     env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
-lib_env = env.Clone()
-SConscript('#service/third_party_libs.scons', 'lib_env')
+gtest_env = SConscript('#extlibs/gtest/SConscript')
+lib_env = gtest_env.Clone()
 
 ######################################################################
 #unit test setting
 ######################################################################
 src_dir = lib_env.get('SRC_DIR')
-gtest_dir = src_dir + '/extlibs/gtest/googletest-release-1.7.0'
 
 easysetup_test_env = lib_env.Clone()
 target_os = env.get('TARGET_OS')
@@ -50,9 +49,6 @@ target_os = env.get('TARGET_OS')
 ######################################################################
 # Build flags
 ######################################################################
-GTest = File(gtest_dir + '/lib/.libs/libgtest.a')
-GTest_Main = File(gtest_dir + '/lib/.libs/libgtest_main.a')
-
 easysetup_test_env.AppendUnique(LIBPATH=[lib_env.get('BUILD_DIR')])
 easysetup_test_env.PrependUnique(LIBS=[
     'connectivity_abstraction',
@@ -60,8 +56,6 @@ easysetup_test_env.PrependUnique(LIBS=[
     'octbstack',
     'oc_logger',
     'coap',
-    GTest_Main,
-    GTest,
 ])
 
 if target_os not in ['windows', 'winrt']:
@@ -72,10 +66,13 @@ easysetup_test_env.AppendUnique(CXXFLAGS=['-pthread'])
 easysetup_test_env.AppendUnique(LIBS=['pthread'])
 
 easysetup_test_env.PrependUnique(CPPPATH=[
-    '#/extlibs/hippomocks/hippomocks', gtest_dir + '/include',
-    '#/resource/csdk/include', '#/resource/csdk/connectivity/api',
-    '#/resource/csdk/stack/include', '#/resource/include',
-    '#/resource/oc_logger/include', '#/service/easy-setup/inc',
+    '#/extlibs/hippomocks/hippomocks',
+    '#/resource/csdk/include',
+    '#/resource/csdk/connectivity/api',
+    '#/resource/csdk/stack/include',
+    '#/resource/include',
+    '#/resource/oc_logger/include',
+    '#/service/easy-setup/inc',
     '#/service/easy-setup/enrollee/inc',
     '#/service/easy-setup/mediator/richsdk/inc'
 ])