CMakeLists.txt 1.45 KB
Newer Older
Steffen Vogel's avatar
Steffen Vogel committed
1
2
3
4
5
6
## CMakeLists.txt
#
# @author Daniel Krebs <github@daniel-krebs.net>
# @copyright 2018, RWTH Institute for Automation of Complex Power Systems (ACS)
# @license GNU General Public License (version 3)
#
7
# VILLAScommon
Steffen Vogel's avatar
Steffen Vogel committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
##############################################################################

23
add_executable(unit-tests-common
Steffen Vogel's avatar
Steffen Vogel committed
24
	logging.cpp
Steffen Vogel's avatar
Steffen Vogel committed
25
	advio.cpp
26
	json_buffer.cpp
Steffen Vogel's avatar
Steffen Vogel committed
27
	bitset.cpp
Steffen Vogel's avatar
Steffen Vogel committed
28
	graph.cpp
Steffen Vogel's avatar
Steffen Vogel committed
29
30
31
32
33
34
35
	hash_table.cpp
	hist.cpp
	kernel.cpp
	list.cpp
	task.cpp
	timing.cpp
	utils.cpp
Steffen Vogel's avatar
Steffen Vogel committed
36
37
)

Steffen Vogel's avatar
Steffen Vogel committed
38
39
40
41
if(ARCH STREQUAL "x86_64")
	list(APPEND TEST_SRC tsc.cpp)
endif()

42
target_include_directories(unit-tests-common PUBLIC
Steffen Vogel's avatar
Steffen Vogel committed
43
	${PROJECT_SOURCE_DIR}/include
Steffen Vogel's avatar
Steffen Vogel committed
44
	${CRITERION_INCLUDE_DIRS}
Steffen Vogel's avatar
Steffen Vogel committed
45
46
)

47
target_link_libraries(unit-tests-common PUBLIC
Steffen Vogel's avatar
Steffen Vogel committed
48
49
50
	villas-common
	${CRITERION_LIBRARIES}
)
51
52

add_custom_target(run-unit-tests-common
Steffen Vogel's avatar
Steffen Vogel committed
53
54
55
	COMMAND $<TARGET_FILE:unit-tests-common> ${CRITERION_OPTS}
	USES_TERMINAL
)