The USRP Hardware Driver (UHD) is now optional.

Used if found.
This commit is contained in:
Carles Fernandez 2016-02-02 23:32:48 +01:00
parent b69e759e45
commit 1b7bc5af0c
3 changed files with 6 additions and 26 deletions

View File

@ -345,7 +345,7 @@ endif(NOT Boost_FOUND)
################################################################################
# GNU Radio - http://gnuradio.org/redmine/projects/gnuradio/wiki
################################################################################
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT UHD)
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT)
find_package(Gnuradio)
if(PC_GNURADIO_RUNTIME_VERSION)
if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS 3.7.3)
@ -822,18 +822,15 @@ endif(NOT GNUTLS_OPENSSL_LIBRARY)
################################################################################
# Universal Hardware Driver (UHD)
# USRP Hardware Driver (UHD) - OPTIONAL
################################################################################
find_package(UHD)
if(NOT UHD_FOUND)
set(ENABLE_UHD OFF)
message(STATUS "The Universal Hardware Driver (UHD) based signal source will not be built,")
message(STATUS "so all USRP-based front-ends will not be usable.")
message(STATUS "Please check http://code.ettus.com/redmine/ettus/projects/uhd/wiki")
message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,")
message(STATUS " so all USRP-based front-ends will not be usable.")
message(STATUS " Please check http://files.ettus.com/manual/")
else(NOT UHD_FOUND)
if(NOT GNURADIO_UHD_FOUND)
message(FATAL_ERROR "*** gnuradio-uhd 3.7 or later is required to build gnss-sdr")
endif(NOT GNURADIO_UHD_FOUND)
set(ENABLE_UHD ON)
endif(NOT UHD_FOUND)

View File

@ -81,7 +81,7 @@ public:
private:
std::string role_;
// UHD SETTINGS
// Front-end settings
bool AGC_enabled_;
double sample_rate_;

View File

@ -62,23 +62,6 @@ TEST(GNSS_Block_Factory_Test, InstantiateFileSignalSource)
EXPECT_STREQ("File_Signal_Source", signal_source->implementation().c_str());
}
/*
TEST(GNSS_Block_Factory_Test, InstantiateUHDSignalSource)
{
std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>();
configuration->set_property("SignalSource.implementation", "UHD_Signal_Source");
configuration->set_property("SignalSource.item_type", "gr_complex");
configuration->set_property("SignalSource.device_address", "192.168.40.2");
gr::msg_queue::sptr queue = gr::msg_queue::make(0);
// Example of a factory created with auto
auto factory = new GNSSBlockFactory();
// Example of a block created with auto
auto signal_source = factory->GetSignalSource(configuration, queue);
EXPECT_STREQ("SignalSource", signal_source->role().c_str());
EXPECT_STREQ("UHD_Signal_Source", signal_source->implementation().c_str());
}
*/
TEST(GNSS_Block_Factory_Test, InstantiateWrongSignalSource)
{