blob: 7c9e2c978cc3ff7ddb7f8721f63a62d72373f702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# @file CMakeLists.txt
# @author Kyungwook Tak (k.tak@samsung.com)
# @brief cmake for test program
#
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
#### test common library ####
PKG_CHECK_MODULES(${TARGET_WAE_TEST_COMMON}_DEP
REQUIRED
)
SET(${TARGET_WAE_TEST_COMMON}_SRCS
colour_log_formatter.cpp
test-common.cpp
)
INCLUDE_DIRECTORIES(
SYSTEM
${${TARGET_WAE_TEST_COMMON}_DEP_INCLUDE_DIRS}
)
INCLUDE_DIRECTORIES(
.
)
ADD_LIBRARY(${TARGET_WAE_TEST_COMMON} SHARED ${${TARGET_WAE_TEST_COMMON}_SRCS})
SET_TARGET_PROPERTIES(${TARGET_WAE_TEST_COMMON}
PROPERTIES
COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=default"
)
TARGET_LINK_LIBRARIES(${TARGET_WAE_TEST_COMMON}
${${TARGET_WAE_TEST_COMMON}_DEP_LIBRARIES}
-lboost_unit_test_framework
)
INSTALL(TARGETS ${TARGET_WAE_TEST_COMMON} DESTINATION ${LIBDIR})
#### main test program ####
PKG_CHECK_MODULES(${TARGET_WAE_TEST}_DEP
REQUIRED
)
SET(${TARGET_WAE_TEST}_SRCS
main.cpp
non-normals.cpp
normals.cpp
internals.cpp
test-helper.cpp
)
INCLUDE_DIRECTORIES(
SYSTEM
${${TARGET_WAE_TEST}_DEP_INCLUDE_DIRS}
)
INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/srcs
.
)
ADD_EXECUTABLE(${TARGET_WAE_TEST} ${${TARGET_WAE_TEST}_SRCS})
TARGET_LINK_LIBRARIES(${TARGET_WAE_TEST}
${${TARGET_WAE_TEST}_DEP_LIBRARIES}
${TARGET_WAE_TEST_COMMON}
${TARGET_WAE}
-lboost_unit_test_framework
-ldl
)
INSTALL(TARGETS ${TARGET_WAE_TEST}
DESTINATION ${BINDIR}
PERMISSIONS
OWNER_READ
OWNER_WRITE
OWNER_EXECUTE
GROUP_READ
GROUP_EXECUTE
WORLD_READ
WORLD_EXECUTE
)
|