From aef1ab5376bb6b5fc0fc9d9b4e4e474668181086 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 29 Oct 2012 14:58:05 -0700 Subject: uhd: unit tests generate script w/ env paths --- host/tests/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'host/tests') 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 @@ -15,6 +15,11 @@ # along with this program. If not, see . # +######################################################################## +# unit test support +######################################################################## +include(UHDUnitTest) + ######################################################################## # unit test suite ######################################################################## @@ -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) ######################################################################## -- cgit v1.2.3