ovni/test/rt/nosv/CMakeLists.txt

28 lines
741 B
CMake
Raw Normal View History

2023-11-02 18:21:26 +01:00
# Copyright (c) 2021-2023 Barcelona Supercomputing Center (BSC)
2022-09-19 12:39:02 +02:00
# SPDX-License-Identifier: GPL-3.0-or-later
2022-09-29 12:41:59 +02:00
2023-11-02 18:21:26 +01:00
find_package(Nosv)
2022-09-29 12:41:59 +02:00
2023-11-02 18:21:26 +01:00
if(NOT NOSV_FOUND)
2023-05-30 18:16:08 +02:00
if(ENABLE_ALL_TESTS)
2023-11-02 18:21:26 +01:00
message(FATAL_ERROR "nOS-V not found, cannot enable nOS-V RT tests")
2023-05-30 18:16:08 +02:00
else()
2023-11-02 18:21:26 +01:00
message(STATUS "nOS-V not found, disabling nOS-V RT tests")
2023-05-30 18:16:08 +02:00
endif()
2022-09-29 12:41:59 +02:00
return()
else()
message(STATUS "Enabling nOS-V RT tests")
endif()
function(nosv_test)
ovni_test(${ARGN})
2023-11-02 18:21:26 +01:00
target_link_libraries("${OVNI_TEST_NAME}" PRIVATE PkgConfig::NOSV)
2022-09-29 12:41:59 +02:00
set_property(TEST "${OVNI_TEST_NAME}" APPEND
PROPERTY
ENVIRONMENT "NOSV_CONFIG=${OVNI_TEST_SOURCE_DIR}/rt/nosv/nosv.toml")
endfunction()
2023-02-15 19:32:34 +01:00
nosv_test(attach.c SORT)
nosv_test(waitfor.c SORT)
nosv_test(several-tasks.c SORT)