diff options
Diffstat (limited to 'host/tests/CMakeLists.txt')
-rw-r--r-- | host/tests/CMakeLists.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index 8b12c961f..8f7fdcd7c 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -45,11 +45,26 @@ SET(test_sources subdev_spec_test.cpp time_spec_test.cpp vrt_test.cpp + expert_test.cpp + fe_conn_test.cpp ) #turn each test cpp file into an executable with an int main() function ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN) +IF(ENABLE_RFNOC) + LIST(APPEND test_sources + block_id_test.cpp + blockdef_test.cpp + device3_test.cpp + graph_search_test.cpp + node_connect_test.cpp + rate_node_test.cpp + stream_sig_test.cpp + tick_node_test.cpp + ) +ENDIF(ENABLE_RFNOC) + IF(ENABLE_C_API) LIST(APPEND test_sources eeprom_c_test.c @@ -70,6 +85,36 @@ FOREACH(test_source ${test_sources}) UHD_INSTALL(TARGETS ${test_name} RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests) ENDFOREACH(test_source) +# Other tests that don't directly link with libuhd: (TODO find a nicer way to do this) +INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/lib/rfnoc/nocscript/) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/) +ADD_EXECUTABLE(nocscript_expr_test + nocscript_expr_test.cpp + ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/expression.cpp +) +TARGET_LINK_LIBRARIES(nocscript_expr_test uhd ${Boost_LIBRARIES}) +UHD_ADD_TEST(nocscript_expr_test nocscript_expr_test) +UHD_INSTALL(TARGETS nocscript_expr_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests) + +ADD_EXECUTABLE(nocscript_ftable_test + nocscript_ftable_test.cpp + ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/function_table.cpp + ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/expression.cpp +) +TARGET_LINK_LIBRARIES(nocscript_ftable_test uhd ${Boost_LIBRARIES}) +UHD_ADD_TEST(nocscript_ftable_test nocscript_ftable_test) +UHD_INSTALL(TARGETS nocscript_ftable_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests) + +ADD_EXECUTABLE(nocscript_parser_test + nocscript_parser_test.cpp + ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/parser.cpp + ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/function_table.cpp + ${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/expression.cpp +) +TARGET_LINK_LIBRARIES(nocscript_parser_test uhd ${Boost_LIBRARIES}) +UHD_ADD_TEST(nocscript_parser_test nocscript_parser_test) +UHD_INSTALL(TARGETS nocscript_parser_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests) + ######################################################################## # demo of a loadable module ######################################################################## @@ -77,3 +122,5 @@ IF(MSVC OR APPLE OR LINUX) ADD_LIBRARY(module_test MODULE module_test.cpp) TARGET_LINK_LIBRARIES(module_test uhd) ENDIF() + +ADD_SUBDIRECTORY(devtest) |