IOT-1583: Removing /W4 warning from resource/c_common.
[platform/upstream/iotivity.git] / resource / c_common / windows / test / SConscript
1 #******************************************************************
2 #
3 # Copyright 2016 Microsoft
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.path
22 from tools.scons.RunTest import *
23
24 Import('test_env')
25
26 c_common_windows_test_env = test_env.Clone()
27
28 ######################################################################
29 # Build flags
30 ######################################################################
31 c_common_windows_test_env.PrependUnique(CPPPATH = ['../include'])
32
33 c_common_windows_test_env.AppendUnique(LIBPATH = [os.path.join(c_common_windows_test_env.get('BUILD_DIR'), 'resource', 'c_common')])
34 c_common_windows_test_env.PrependUnique(LIBS = ['win_helper'])
35
36 if c_common_windows_test_env.get('LOGGING'):
37     c_common_windows_test_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
38
39 ######################################################################
40 # Source files and Targets
41 ######################################################################
42 c_common_windows_tests = c_common_windows_test_env.Program('c_common_windows_tests', ['snprintf_test.cpp'])
43
44 Alias("test", [c_common_windows_tests])
45
46 c_common_windows_test_env.AppendTarget('test')
47
48 if c_common_windows_test_env.get('TEST') == '1':
49     run_test(c_common_windows_test_env,
50              'resource_c_common_windows_test.memcheck',
51              'resource/c_common/windows/test/c_common_windows_tests')