IOT-1583: Removing /W4 warning from resource/c_common.
[platform/upstream/iotivity.git] / resource / c_common / oic_string / test / SConscript
1 #******************************************************************
2 #
3 # Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4 #
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 import os
22 import os.path
23 from tools.scons.RunTest import *
24
25 Import('test_env')
26
27 # SConscript file for Local PKI google tests
28 stringtest_env = test_env.Clone()
29 target_os = stringtest_env.get('TARGET_OS')
30
31 ######################################################################
32 # Build flags
33 ######################################################################
34 stringtest_env.PrependUnique(CPPPATH = ['../include'])
35
36 stringtest_env.AppendUnique(LIBPATH = [os.path.join(stringtest_env.get('BUILD_DIR'), 'resource', 'c_common')])
37 stringtest_env.PrependUnique(LIBS = ['c_common'])
38
39 if stringtest_env.get('LOGGING'):
40     stringtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
41 #
42 ######################################################################
43 # Source files and Targets
44 ######################################################################
45 stringtests = stringtest_env.Program('stringtests', ['linux/oic_string_tests.cpp'])
46
47 Alias("test", [stringtests])
48
49 stringtest_env.AppendTarget('test')
50 if stringtest_env.get('TEST') == '1':
51     if target_os in ['linux', 'windows']:
52                 run_test(stringtest_env,
53                          'resource_ccommon_string_test.memcheck',
54                          'resource/c_common/oic_string/test/stringtests')