diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-04-05 18:58:31 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-04-05 18:58:31 -0400 |
commit | ac0866b9ca84895ed0496b8abc35b9754cc6b1e6 (patch) | |
tree | 2721fe08f2082abe80f0ea7879e7a012e91e7bbc | |
parent | af9da9967a67b08da551a1488e60d3b2f37f5e66 (diff) |
runtime: (re)creating a pmt shared lib to link against.
This fixes a bug between versions of loaders that pull in the PMT
definitions differently. The symptom is a problem in gr_block_registry
where it creates a PMT dictionary before PMT pointers are known, so
the dictionary's intrusive pointer is invalid.
-rw-r--r-- | gnuradio-runtime/lib/CMakeLists.txt | 6 | ||||
-rw-r--r-- | gnuradio-runtime/lib/pmt/CMakeLists.txt | 34 | ||||
-rw-r--r-- | gnuradio-runtime/swig/CMakeLists.txt | 1 |
3 files changed, 26 insertions, 15 deletions
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt index d21beb1414..3f051b08c1 100644 --- a/gnuradio-runtime/lib/CMakeLists.txt +++ b/gnuradio-runtime/lib/CMakeLists.txt @@ -60,8 +60,8 @@ include_directories(${GNURADIO_RUNTIME_INCLUDE_DIRS} ######################################################################## # Include subdirs rather to populate to the sources lists. ######################################################################## -GR_INCLUDE_SUBDIRECTORY(messages) GR_INCLUDE_SUBDIRECTORY(pmt) +GR_INCLUDE_SUBDIRECTORY(messages) GR_INCLUDE_SUBDIRECTORY(thread) ######################################################################## @@ -136,6 +136,7 @@ endif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)") list(APPEND gnuradio_runtime_libs volk + gnuradio-pmt ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES} ) @@ -269,13 +270,14 @@ list(APPEND test_gnuradio_runtime_sources qa_sincos.cc pmt/qa_pmt.cc pmt/qa_pmt_prims.cc + ${CMAKE_CURRENT_BINARY_DIR}/pmt/qa_pmt_unv.cc ) include_directories(${CPPUNIT_INCLUDE_DIRS}) link_directories(${CPPUNIT_LIBRARY_DIRS}) add_library(test-gnuradio-runtime SHARED ${test_gnuradio_runtime_sources}) -target_link_libraries(test-gnuradio-runtime gnuradio-runtime ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES}) +target_link_libraries(test-gnuradio-runtime gnuradio-runtime gnuradio-pmt ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES}) ######################################################################## # Build the test executable diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt index 9d191df06a..3dc35e43f6 100644 --- a/gnuradio-runtime/lib/pmt/CMakeLists.txt +++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt @@ -74,18 +74,26 @@ add_custom_command( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) -list(APPEND gnuradio_runtime_sources - ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc +set(pmt_sources + ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc +) + +list(APPEND gnuradio_pmt_libs + ${Boost_LIBRARIES} + ${LOG4CPP_LIBRARIES} +) + +add_library(gnuradio-pmt SHARED ${pmt_sources}) +target_link_libraries(gnuradio-pmt ${gnuradio_pmt_libs}) + +GR_LIBRARY_FOO(gnuradio-pmt RUNTIME_COMPONENT "runtime" DEVEL_COMPONENT "runtime_devel") + +add_dependencies(gnuradio-pmt + pmt_generated ) -if(ENABLE_TESTING) - list(APPEND test_gnuradio_runtime_sources - ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc - ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt_prims.cc - ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt.cc - ) -endif(ENABLE_TESTING) +# Testing is handled in gnuradio-runtime tests one level down.
\ No newline at end of file diff --git a/gnuradio-runtime/swig/CMakeLists.txt b/gnuradio-runtime/swig/CMakeLists.txt index 930f1fa2b0..3bff08383f 100644 --- a/gnuradio-runtime/swig/CMakeLists.txt +++ b/gnuradio-runtime/swig/CMakeLists.txt @@ -34,6 +34,7 @@ set(GR_SWIG_INCLUDE_DIRS link_directories(${Boost_LIBRARY_DIRS}) set(GR_SWIG_LIBRARIES + gnuradio-pmt gnuradio-runtime ${LOG4CPP_LIBRARIES} ) |