Merge "Move variables declarations from header to source" into tizen
[sdk/target/sdbd.git] / test / CMakeLists.txt
1 # Copyright (c) 2014 Samsung Electronics Co., Ltd
2 #
3 # Licensed under the Apache License, Version 2.0 (the License);
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an AS IS BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15
16 cmake_minimum_required (VERSION 2.8.3)
17 project (sdbd_tests)
18
19 include(FindPkgConfig)
20 pkg_check_modules(CHECK check>=0.9.8 REQUIRED)
21
22 enable_testing()
23
24 add_executable(sdbd_tests ../src/commandline_sdbd.c test_commandline_sdbd.c)
25
26 set_property(
27         TARGET sdbd_tests
28         APPEND PROPERTY COMPILE_DEFINITIONS
29         _XOPEN_SOURCE
30         _GNU_SOURCE
31 )
32
33 include_directories(../src)
34
35 include_directories(${CHECK_INCLUDE_DIRS})
36 target_link_libraries (sdbd_tests ${CHECK_LDFLAGS})
37
38 add_test(InternalUnitTests sdbd_tests)
39 set_tests_properties(InternalUnitTests PROPERTIES
40         PASS_REGULAR_EXPRESSION "100%: Checks: [0-9]+, Failures: 0, Errors: 0")