2022-01-18 20:18:49 +00:00
|
|
|
# Copyright 2018-2022, Collabora, Ltd.
|
2021-11-03 19:22:13 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
2020-06-15 15:58:48 +00:00
|
|
|
|
|
|
|
# Catch2 main test driver
|
|
|
|
add_library(tests_main STATIC tests_main.cpp)
|
|
|
|
target_link_libraries(tests_main PUBLIC xrt-external-catch2)
|
|
|
|
if(ANDROID)
|
|
|
|
target_link_libraries(tests_main PUBLIC log)
|
|
|
|
endif()
|
|
|
|
|
2022-02-18 21:38:00 +00:00
|
|
|
foreach(
|
|
|
|
testname
|
|
|
|
tests_cxx_wrappers
|
|
|
|
tests_generic_callbacks
|
|
|
|
tests_history_buf
|
|
|
|
tests_id_ringbuffer
|
|
|
|
tests_input_transform
|
|
|
|
tests_json
|
2022-02-18 21:45:21 +00:00
|
|
|
tests_lowpass
|
2022-02-18 21:38:00 +00:00
|
|
|
tests_lowpass_int
|
2022-02-18 21:38:00 +00:00
|
|
|
tests_pacing
|
|
|
|
tests_quatexpmap
|
2022-01-28 23:49:38 +00:00
|
|
|
tests_rational
|
2021-11-11 23:41:58 +00:00
|
|
|
)
|
2021-03-26 19:49:54 +00:00
|
|
|
|
2022-02-18 21:38:00 +00:00
|
|
|
add_executable(${testname} ${testname}.cpp)
|
|
|
|
target_link_libraries(${testname} PRIVATE tests_main)
|
|
|
|
target_link_libraries(${testname} PRIVATE aux_util)
|
|
|
|
add_test(NAME ${testname} COMMAND ${testname} --success)
|
|
|
|
endforeach()
|
2021-10-31 03:18:12 +00:00
|
|
|
|
2022-02-18 21:38:00 +00:00
|
|
|
# For tests that require more than just aux_util, link those other libs down here.
|
2021-12-02 21:43:25 +00:00
|
|
|
|
2022-02-18 21:38:00 +00:00
|
|
|
target_link_libraries(tests_cxx_wrappers PRIVATE xrt-interfaces)
|
|
|
|
target_link_libraries(tests_history_buf PRIVATE aux_math)
|
|
|
|
target_link_libraries(tests_input_transform PRIVATE st_oxr xrt-interfaces xrt-external-openxr)
|
2022-02-18 21:45:21 +00:00
|
|
|
target_link_libraries(tests_lowpass PRIVATE aux_tracking)
|
2022-02-18 21:38:00 +00:00
|
|
|
target_link_libraries(tests_lowpass_int PRIVATE aux_tracking)
|
2021-12-22 15:16:27 +00:00
|
|
|
target_link_libraries(tests_quatexpmap PRIVATE aux_math)
|
2022-01-28 23:49:38 +00:00
|
|
|
target_link_libraries(tests_rational PRIVATE aux_math)
|