2018-06-25 09:44:58 +02:00
|
|
|
# CMakeLists.txt.
|
|
|
|
#
|
2025-01-14 14:42:39 +00:00
|
|
|
# Author: Steffen Vogel <post@steffenvogel.de>
|
|
|
|
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2018-06-25 09:44:58 +02:00
|
|
|
|
2018-08-23 17:34:00 +02:00
|
|
|
set(TEST_SRC
|
2025-01-14 14:42:39 +00:00
|
|
|
config_json.cpp
|
|
|
|
config.cpp
|
|
|
|
format.cpp
|
|
|
|
helpers.cpp
|
|
|
|
json.cpp
|
|
|
|
main.cpp
|
|
|
|
mapping.cpp
|
|
|
|
memory.cpp
|
|
|
|
pool.cpp
|
|
|
|
queue_signalled.cpp
|
|
|
|
queue.cpp
|
|
|
|
signal.cpp
|
2018-08-23 17:34:00 +02:00
|
|
|
)
|
2018-06-25 09:44:58 +02:00
|
|
|
|
2018-08-23 17:34:00 +02:00
|
|
|
add_executable(unit-tests ${TEST_SRC})
|
|
|
|
target_link_libraries(unit-tests PUBLIC
|
2025-01-14 14:42:39 +00:00
|
|
|
PkgConfig::CRITERION
|
|
|
|
Threads::Threads
|
|
|
|
villas
|
2018-08-23 17:34:00 +02:00
|
|
|
)
|
2018-06-25 09:44:58 +02:00
|
|
|
|
2018-08-23 17:34:00 +02:00
|
|
|
add_custom_target(run-unit-tests
|
2025-01-14 14:42:39 +00:00
|
|
|
COMMAND
|
|
|
|
/bin/bash -o pipefail -c \"
|
|
|
|
$<TARGET_FILE:unit-tests> 2>&1 | c++filt\"
|
|
|
|
DEPENDS
|
|
|
|
unit-tests
|
|
|
|
USES_TERMINAL
|
2018-08-23 17:34:00 +02:00
|
|
|
)
|
2018-06-30 10:37:49 +02:00
|
|
|
|
2018-08-23 17:34:00 +02:00
|
|
|
add_dependencies(tests unit-tests)
|
|
|
|
add_dependencies(run-tests run-unit-tests)
|