summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/pmt/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/pmt/CMakeLists.txt')
-rw-r--r--gnuradio-runtime/lib/pmt/CMakeLists.txt32
1 files changed, 31 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt
index 8d2dec8d14..1a8cc57ce8 100644
--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt
@@ -113,5 +113,35 @@ add_dependencies(gnuradio-pmt
pmt_generated
)
-# Testing is handled in gnuradio-runtime tests one level down.
+########################################################################
+# Setup tests
+########################################################################
+if(ENABLE_TESTING)
+include(GrTest)
+
+########################################################################
+# Append gnuradio-runtime test sources
+########################################################################
+list(APPEND test_gnuradio_pmt_sources
+ qa_pmt.cc
+ qa_pmt_prims.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
+)
+
+include_directories(${CPPUNIT_INCLUDE_DIRS})
+link_directories(${CPPUNIT_LIBRARY_DIRS})
+
+add_library(test-gnuradio-pmt SHARED ${test_gnuradio_pmt_sources})
+target_link_libraries(test-gnuradio-pmt gnuradio-runtime gnuradio-pmt
+ ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES})
+
+########################################################################
+# Build the test executable
+# Set the test environment so the build libs will be found under MSVC.
+########################################################################
+list(APPEND GR_TEST_TARGET_DEPS test-gnuradio-pmt)
+add_executable(gr_pmt_test test_pmt.cc)
+target_link_libraries(gr_pmt_test test-gnuradio-pmt)
+GR_ADD_TEST(gr-pmt-test gr_pmt_test)
+endif(ENABLE_TESTING) \ No newline at end of file