summaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index d93b0cc2e..f5cead184 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -16,6 +16,11 @@
#
########################################################################
+# unit test support
+########################################################################
+include(UHDUnitTest)
+
+########################################################################
# unit test suite
########################################################################
SET(test_sources
@@ -39,12 +44,15 @@ SET(test_sources
#turn each test cpp file into an executable with an int main() function
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
+SET(UHD_TEST_TARGET_DEPS uhd)
+SET(UHD_TEST_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
+
#for each source: build an executable, register it as a test
FOREACH(test_source ${test_sources})
GET_FILENAME_COMPONENT(test_name ${test_source} NAME_WE)
ADD_EXECUTABLE(${test_name} ${test_source})
TARGET_LINK_LIBRARIES(${test_name} uhd)
- ADD_TEST(${test_name} ${test_name})
+ UHD_ADD_TEST(${test_name} ${test_name})
ENDFOREACH(test_source)
########################################################################