From 7152711a8bb340bdcb9eab68c4d132962c8f6018 Mon Sep 17 00:00:00 2001 From: nzqo Date: Tue, 18 Feb 2025 11:55:20 +0100 Subject: [PATCH] Adressing MR comments and more fixes - Added missing override specifiers - Specified CMake policy for FindBoost - Reintroduced capture of chan variable --- host/cmake/Modules/UHDBoost.cmake | 8 ++++++++ host/lib/rfnoc/radio_control_impl.cpp | 1 + host/lib/rfnoc/rfnoc_graph.cpp | 2 +- host/tests/rfnoc_block_tests/fft_block_test.cpp | 2 +- host/tests/rfnoc_block_tests/fft_block_test_v2.cpp | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/host/cmake/Modules/UHDBoost.cmake b/host/cmake/Modules/UHDBoost.cmake index e8c0aae6a1..c09a94d88c 100644 --- a/host/cmake/Modules/UHDBoost.cmake +++ b/host/cmake/Modules/UHDBoost.cmake @@ -186,11 +186,19 @@ if(${UHD_BOOST_OPTIONAL_COMPONENTS_LEN} GREATER 0) endif() if(${UHD_BOOST_REQUIRED_COMPONENTS_LEN} GREATER 0) + # With removal of FindBoost, default to automatically searching + # the upstream BoostConfig.cmake. + if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) + endif(POLICY CMP0167) + message(STATUS " Looking for required Boost components...") find_package(Boost ${UHD_BOOST_MIN_VERSION} QUIET COMPONENTS ${UHD_BOOST_REQUIRED_COMPONENTS} ${UHD_BOOST_REQUIRED}) endif() + + # restore BUILD_SHARED_LIBS, if set if(BUILD_SHARED_LIBS_SET) set(BUILD_SHARED_LIBS ${OLD_BUILD_SHARED_LIBS}) diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index 735a8a9929..1012b736ff 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -244,6 +244,7 @@ radio_control_impl::radio_control_impl(make_args_ptr make_args) add_property_resolver({&_samp_rate_in.back(), &_samp_rate_out.back()}, {&_samp_rate_in.back(), &_samp_rate_out.back()}, [this, + chan, &samp_rate_in = _samp_rate_in.at(chan), &samp_rate_out = _samp_rate_out.at(chan)]() { UHD_LOGGER_TRACE(this->get_unique_id()) diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index 6c5c626a9c..0a1e93d867 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -597,7 +597,7 @@ class rfnoc_graph_impl : public rfnoc_graph return _graph->to_dot(); } - chdr_w_t get_chdr_width(const size_t mb_index) const + chdr_w_t get_chdr_width(const size_t mb_index) const override { UHD_ASSERT_THROW(mb_index < _num_mboards); return _device->get_mb_iface(mb_index).get_chdr_w(); diff --git a/host/tests/rfnoc_block_tests/fft_block_test.cpp b/host/tests/rfnoc_block_tests/fft_block_test.cpp index ad76f19d71..08f735b2b7 100644 --- a/host/tests/rfnoc_block_tests/fft_block_test.cpp +++ b/host/tests/rfnoc_block_tests/fft_block_test.cpp @@ -42,7 +42,7 @@ class fft_mock_reg_iface_t : public mock_reg_iface_t } } - void _peek_cb(uint32_t addr, uhd::time_spec_t /*time*/) + void _peek_cb(uint32_t addr, uhd::time_spec_t /*time*/) override { if ((addr >= fft_block_control::REG_COMPAT_ADDR) && (addr <= fft_block_control::REG_CP_REM_LIST_OCC_ADDR)) { diff --git a/host/tests/rfnoc_block_tests/fft_block_test_v2.cpp b/host/tests/rfnoc_block_tests/fft_block_test_v2.cpp index 70dac44d25..364505dd56 100644 --- a/host/tests/rfnoc_block_tests/fft_block_test_v2.cpp +++ b/host/tests/rfnoc_block_tests/fft_block_test_v2.cpp @@ -76,7 +76,7 @@ class fft_mock_reg_iface_t : public mock_reg_iface_t } } - void _peek_cb(uint32_t addr, uhd::time_spec_t /*time*/) + void _peek_cb(uint32_t addr, uhd::time_spec_t /*time*/) override { if (addr >= fft_block_control::REG_RESET_ADDR_V1) { throw uhd::assertion_error(