diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/CMakeLists.txt | 3 | ||||
-rw-r--r-- | host/config/CPack.cmake | 41 | ||||
-rw-r--r-- | host/config/Version.cmake | 71 | ||||
-rw-r--r-- | host/examples/rx_timed_samples.cpp | 7 | ||||
-rw-r--r-- | host/include/uhd/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/types/dict.hpp | 8 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_base.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/utils/algorithm.hpp | 11 | ||||
-rw-r--r-- | host/include/uhd/utils/pimpl.hpp | 3 | ||||
-rw-r--r-- | host/include/uhd/version.hpp | 28 | ||||
-rw-r--r-- | host/lib/CMakeLists.txt | 6 | ||||
-rw-r--r-- | host/lib/transport/vrt_packet_handler.hpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/dboard_base.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/dboard_ctor_args.hpp | 20 | ||||
-rw-r--r-- | host/lib/usrp/dboard_manager.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/dsp_utils.hpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/tune_helper.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 12 | ||||
-rw-r--r-- | host/lib/version.cpp.in | 22 |
19 files changed, 172 insertions, 82 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 8e28ddb34..ceea5d024 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -20,9 +20,10 @@ PROJECT(UHD CXX) ENABLE_TESTING() ######################################################################## -# Config Files +# Config Files (include order is important) ######################################################################## INCLUDE(${CMAKE_SOURCE_DIR}/config/Python.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/config/Version.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/config/CPack.cmake) ######################################################################## diff --git a/host/config/CPack.cmake b/host/config/CPack.cmake index ed4aeb717..a86f452f9 100644 --- a/host/config/CPack.cmake +++ b/host/config/CPack.cmake @@ -16,46 +16,6 @@ # ######################################################################## -# Setup Version Numbers -######################################################################## -SET(UHD_VERSION_MAJOR 0) -SET(UHD_VERSION_MINOR 0) -SET(UHD_VERSION_PATCH 0) - -######################################################################## -# Get the current YYYYMMDD HHMMSS timestamp -######################################################################## -EXECUTE_PROCESS( - COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%Y%m%d', time.gmtime())" - OUTPUT_VARIABLE UHD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE -) -SET(UHD_VERSION_MAJOR ${UHD_DATE}) - -EXECUTE_PROCESS( - COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%H%M%S', time.gmtime())" - OUTPUT_VARIABLE UHD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE -) -SET(UHD_VERSION_MINOR ${UHD_TIME}) - -######################################################################## -# Find GIT to get repo information -######################################################################## -MESSAGE(STATUS "Checking for git") -FIND_PROGRAM(GIT git) -IF(${GIT} STREQUAL "GIT-NOTFOUND") - MESSAGE(STATUS "Checking for git - not found") - SET(UHD_REV "unknown") -ELSE(${GIT} STREQUAL "GIT-NOTFOUND") - MESSAGE(STATUS "Checking for git - found") - EXECUTE_PROCESS( - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${GIT} rev-parse --short HEAD - OUTPUT_VARIABLE UHD_REV OUTPUT_STRIP_TRAILING_WHITESPACE - ) -ENDIF(${GIT} STREQUAL "GIT-NOTFOUND") -SET(UHD_VERSION_PATCH ${UHD_REV}) - -######################################################################## # Setup CPack ######################################################################## SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - Universal Hardware Driver") @@ -79,3 +39,4 @@ STRING(REPLACE "," ", " CPACK_DEBIAN_PACKAGE_DEPENDS SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= ${BOOST_MIN_VERSION}") INCLUDE(CPack) #include after setting vars +MESSAGE(STATUS "Version: ${CPACK_PACKAGE_VERSION}") diff --git a/host/config/Version.cmake b/host/config/Version.cmake new file mode 100644 index 000000000..a592a4565 --- /dev/null +++ b/host/config/Version.cmake @@ -0,0 +1,71 @@ +# +# Copyright 2010 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +######################################################################## +# Setup Version Numbers +######################################################################## +SET(UHD_VERSION_MAJOR 0) +SET(UHD_VERSION_MINOR 0) +SET(UHD_VERSION_PATCH 0) + +######################################################################## +# Find GIT to get repo information +######################################################################## +MESSAGE(STATUS "Checking for git") +FIND_PROGRAM(GIT git) +IF(${GIT} STREQUAL "GIT-NOTFOUND") + MESSAGE(STATUS "Checking for git - not found") +ELSE(${GIT} STREQUAL "GIT-NOTFOUND") + MESSAGE(STATUS "Checking for git - found") + + #grab the git log entry for the current head + EXECUTE_PROCESS( + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${GIT} log HEAD~..HEAD --date=raw + OUTPUT_VARIABLE _git_log OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + #extract the timestamp from the git log entry + EXECUTE_PROCESS( + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${PYTHON_EXECUTABLE} -c "import re; print re.match('^.*Date:\\s*(\\d*).*$', '''${_git_log}''', re.MULTILINE | re.DOTALL).groups()[0]" + OUTPUT_VARIABLE _git_timestamp OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + #format the timestamp into YYYY-MM-DD + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%Y%m%d', time.gmtime(${_git_timestamp}))" + OUTPUT_VARIABLE _git_date OUTPUT_STRIP_TRAILING_WHITESPACE + ) + SET(UHD_VERSION_MAJOR ${_git_date}) + + #format the timestamp into HH-MM-SS + EXECUTE_PROCESS( + COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%H%M%S', time.gmtime(${_git_timestamp}))" + OUTPUT_VARIABLE _git_time OUTPUT_STRIP_TRAILING_WHITESPACE + ) + SET(UHD_VERSION_MINOR ${_git_time}) + + #grab the git ref id for the current head + EXECUTE_PROCESS( + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${GIT} rev-parse --short HEAD + OUTPUT_VARIABLE _git_rev OUTPUT_STRIP_TRAILING_WHITESPACE + ) + SET(UHD_VERSION_PATCH ${_git_rev}) + +ENDIF(${GIT} STREQUAL "GIT-NOTFOUND") diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp index 3b9acbb2c..4856f6779 100644 --- a/host/examples/rx_timed_samples.cpp +++ b/host/examples/rx_timed_samples.cpp @@ -74,8 +74,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //setup streaming std::cout << std::endl; - std::cout << boost::format("Begin streaming %u samples, %d seconds in the future...") - % total_num_samps % seconds_in_future << std::endl; + std::cout << boost::format( + "Begin streaming %u samples, %d seconds in the future..." + ) % total_num_samps % seconds_in_future << std::endl; uhd::stream_cmd_t stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE); stream_cmd.num_samps = total_num_samps; stream_cmd.stream_now = false; @@ -102,7 +103,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ if (num_acc_samps == 0) continue; std::cout << boost::format( "Got timeout before all samples received, possible packet loss, exiting loop..." - ) % md.error_code << std::endl; + ) << std::endl; goto done_loop; default: diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index c0339dbd3..ad528c9fb 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -25,6 +25,7 @@ INSTALL(FILES config.hpp device.hpp device.ipp + version.hpp wax.hpp DESTINATION ${INCLUDE_DIR}/uhd ) diff --git a/host/include/uhd/types/dict.hpp b/host/include/uhd/types/dict.hpp index 50a2b5c3b..de96ea768 100644 --- a/host/include/uhd/types/dict.hpp +++ b/host/include/uhd/types/dict.hpp @@ -20,7 +20,10 @@ #include <uhd/config.hpp> #include <boost/foreach.hpp> +#include <boost/format.hpp> +#include <boost/lexical_cast.hpp> #include <stdexcept> +#include <typeinfo> #include <vector> #include <list> @@ -117,7 +120,10 @@ namespace uhd{ BOOST_FOREACH(const pair_t &p, _map){ if (p.first == key) return p.second; } - throw std::invalid_argument("key not found in dict"); + throw std::invalid_argument(str(boost::format( + "key \"%s\" not found in dict(%s, %s)" + ) % boost::lexical_cast<std::string>(key) + % typeid(Key).name() % typeid(Val).name())); } /*! diff --git a/host/include/uhd/usrp/dboard_base.hpp b/host/include/uhd/usrp/dboard_base.hpp index e88d39876..9b75d791f 100644 --- a/host/include/uhd/usrp/dboard_base.hpp +++ b/host/include/uhd/usrp/dboard_base.hpp @@ -40,7 +40,7 @@ public: * Derived classes should pass the args into the base class, * but should not deal with the internals of the args. */ - struct ctor_args_impl; typedef ctor_args_impl* ctor_args_t; + typedef void * ctor_args_t; //structors dboard_base(ctor_args_t); diff --git a/host/include/uhd/utils/algorithm.hpp b/host/include/uhd/utils/algorithm.hpp index b52edc6b5..54bc78494 100644 --- a/host/include/uhd/utils/algorithm.hpp +++ b/host/include/uhd/utils/algorithm.hpp @@ -112,17 +112,6 @@ namespace std{ } /*! - * A templated signum implementation. - * \param n the comparable to process - * \return -1 when n negative, +1 when n positive, otherwise 0 - */ - template<typename T> inline int signum(T n){ - if (n < 0) return -1; - if (n > 0) return +1; - return 0; - } - - /*! * A templated clip implementation. * \param val the value to clip between an upper and lower limit * \param bound1 the upper or lower bound diff --git a/host/include/uhd/utils/pimpl.hpp b/host/include/uhd/utils/pimpl.hpp index 09bf0c0a2..18454f0c4 100644 --- a/host/include/uhd/utils/pimpl.hpp +++ b/host/include/uhd/utils/pimpl.hpp @@ -20,6 +20,7 @@ #include <uhd/config.hpp> #include <boost/shared_ptr.hpp> +#include <boost/make_shared.hpp> /*! \file pimpl.hpp * "Pimpl idiom" (pointer to implementation idiom). @@ -50,6 +51,6 @@ * \param _args the constructor args for the pimpl */ #define UHD_PIMPL_MAKE(_name, _args) \ - boost::shared_ptr<_name>(new _name _args) + boost::make_shared<_name> _args #endif /* INCLUDED_UHD_UTILS_PIMPL_HPP */ diff --git a/host/include/uhd/version.hpp b/host/include/uhd/version.hpp new file mode 100644 index 000000000..19d672e65 --- /dev/null +++ b/host/include/uhd/version.hpp @@ -0,0 +1,28 @@ +// +// Copyright 2010 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_VERSION_HPP +#define INCLUDED_UHD_VERSION_HPP + +#include <uhd/config.hpp> +#include <string> + +namespace uhd{ + UHD_API std::string get_version_string(void); +} //namespace uhd + +#endif /* INCLUDED_UHD_VERSION_HPP */ diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index cc60dfbba..767029dc4 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -105,6 +105,11 @@ ENDIF(HAVE_DLFCN_H) ######################################################################## # Append to the list of sources for lib uhd ######################################################################## +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in + ${CMAKE_CURRENT_BINARY_DIR}/version.cpp +@ONLY) + LIBUHD_APPEND_SOURCES( ${CMAKE_CURRENT_SOURCE_DIR}/device.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gain_handler.cpp @@ -112,6 +117,7 @@ LIBUHD_APPEND_SOURCES( ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority.cpp ${CMAKE_CURRENT_SOURCE_DIR}/types.cpp ${CMAKE_CURRENT_SOURCE_DIR}/utils.cpp + ${CMAKE_CURRENT_BINARY_DIR}/version.cpp ${CMAKE_CURRENT_SOURCE_DIR}/wax.cpp ) diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp index 0cc5eef76..7e0588f03 100644 --- a/host/lib/transport/vrt_packet_handler.hpp +++ b/host/lib/transport/vrt_packet_handler.hpp @@ -293,7 +293,6 @@ template <typename T> UHD_INLINE T get_context_code( * Pack a vrt header, copy-convert the data, and send it. * - helper function for vrt_packet_handler::send ******************************************************************/ - template<typename vrt_packer_type> static UHD_INLINE void _send1( send_state &state, const std::vector<const void *> &buffs, @@ -302,7 +301,7 @@ template <typename T> UHD_INLINE T get_context_code( uhd::transport::vrt::if_packet_info_t &if_packet_info, const uhd::io_type_t &io_type, const uhd::otw_type_t &otw_type, - vrt_packer_type vrt_packer, + const vrt_packer_t &vrt_packer, const get_send_buffs_t &get_send_buffs, size_t vrt_header_offset_words32 ){ diff --git a/host/lib/usrp/dboard_base.cpp b/host/lib/usrp/dboard_base.cpp index eafb8897f..6c4e29d9e 100644 --- a/host/lib/usrp/dboard_base.cpp +++ b/host/lib/usrp/dboard_base.cpp @@ -26,12 +26,12 @@ using namespace uhd::usrp; * dboard_base dboard dboard_base class **********************************************************************/ struct dboard_base::impl{ - ctor_args_impl args; - impl(ctor_args_t args) : args(*args){} + dboard_ctor_args_t args; }; dboard_base::dboard_base(ctor_args_t args){ - _impl = UHD_PIMPL_MAKE(impl, (args)); + _impl = UHD_PIMPL_MAKE(impl, ()); + _impl->args = *static_cast<dboard_ctor_args_t *>(args); } dboard_base::~dboard_base(void){ diff --git a/host/lib/usrp/dboard_ctor_args.hpp b/host/lib/usrp/dboard_ctor_args.hpp index 13abe79e8..708f2ea08 100644 --- a/host/lib/usrp/dboard_ctor_args.hpp +++ b/host/lib/usrp/dboard_ctor_args.hpp @@ -15,18 +15,22 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#ifndef INCLUDED_DBOARD_CTOR_ARGS_HPP -#define INCLUDED_DBOARD_CTOR_ARGS_HPP +#ifndef INCLUDED_LIBUHD_USRP_DBOARD_CTOR_ARGS_HPP +#define INCLUDED_LIBUHD_USRP_DBOARD_CTOR_ARGS_HPP #include <uhd/usrp/dboard_id.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_iface.hpp> #include <string> -struct uhd::usrp::dboard_base::ctor_args_impl{ - std::string sd_name; - dboard_iface::sptr db_iface; - dboard_id_t rx_id, tx_id; -}; +namespace uhd{ namespace usrp{ -#endif /* INCLUDED_DBOARD_CTOR_ARGS_HPP */ + struct dboard_ctor_args_t{ + std::string sd_name; + dboard_iface::sptr db_iface; + dboard_id_t rx_id, tx_id; + }; + +}} //namespace + +#endif /* INCLUDED_LIBUHD_USRP_DBOARD_CTOR_ARGS_HPP */ diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp index 6321e018f..bfaaf0969 100644 --- a/host/lib/usrp/dboard_manager.cpp +++ b/host/lib/usrp/dboard_manager.cpp @@ -242,7 +242,7 @@ dboard_manager_impl::dboard_manager_impl( set_nice_dboard_if(); //dboard constructor args - dboard_base::ctor_args_impl db_ctor_args; + dboard_ctor_args_t db_ctor_args; db_ctor_args.db_iface = iface; //make xcvr subdevs (make one subdev for both rx and tx dboards) diff --git a/host/lib/usrp/dsp_utils.hpp b/host/lib/usrp/dsp_utils.hpp index 2f246c788..ebed12c41 100644 --- a/host/lib/usrp/dsp_utils.hpp +++ b/host/lib/usrp/dsp_utils.hpp @@ -82,11 +82,11 @@ namespace dsp_type1{ double &freq, double codec_rate ){ - UHD_ASSERT_THROW(freq >= -codec_rate/2.0 and freq < codec_rate/2.0); + UHD_ASSERT_THROW(std::abs(freq) <= codec_rate/2.0); static const double scale_factor = std::pow(2.0, 32); //calculate the freq register word (signed) - boost::int32_t freq_word = boost::math::iround((freq / codec_rate) * scale_factor); + boost::int32_t freq_word = boost::int32_t(boost::math::round((freq / codec_rate) * scale_factor)); //update the actual frequency freq = (double(freq_word) / scale_factor) * codec_rate; diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp index c5cce3ecf..e516477d3 100644 --- a/host/lib/usrp/tune_helper.cpp +++ b/host/lib/usrp/tune_helper.cpp @@ -16,10 +16,10 @@ // #include <uhd/usrp/tune_helper.hpp> -#include <uhd/utils/algorithm.hpp> #include <uhd/usrp/subdev_props.hpp> #include <uhd/usrp/dsp_props.hpp> #include <uhd/usrp/dboard_iface.hpp> //unit_t +#include <boost/math/special_functions/sign.hpp> #include <cmath> using namespace uhd; @@ -46,7 +46,7 @@ static tune_result_t tune_xx_subdev_and_dxc( double delta_freq = std::fmod(target_freq - actual_inter_freq, dxc_sample_rate); bool outside_of_nyquist = std::abs(delta_freq) > dxc_sample_rate/2.0; double target_dxc_freq = (outside_of_nyquist)? - std::signum(delta_freq)*dxc_sample_rate - delta_freq : -delta_freq; + boost::math::sign(delta_freq)*dxc_sample_rate - delta_freq : -delta_freq; //invert the sign on the dxc freq given the following conditions if (unit == dboard_iface::UNIT_TX) target_dxc_freq *= -1.0; diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 9a7f34531..aa6d15783 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -32,6 +32,8 @@ using namespace uhd::usrp; using namespace uhd::transport; namespace asio = boost::asio; +static const int underflow_flags = async_metadata_t::EVENT_CODE_UNDERFLOW | async_metadata_t::EVENT_CODE_UNDERFLOW_IN_PACKET; + /*********************************************************************** * io impl details (internal to this file) * - pirate crew @@ -56,9 +58,9 @@ struct usrp2_impl::io_impl{ recv_pirate_crew.join_all(); } - bool get_recv_buffs(vrt_packet_handler::managed_recv_buffs_t &buffs){ + bool get_recv_buffs(vrt_packet_handler::managed_recv_buffs_t &buffs, size_t timeout_ms){ boost::this_thread::disable_interruption di; //disable because the wait can throw - return recv_pirate_booty->pop_elems_with_timed_wait(buffs, boost::posix_time::milliseconds(recv_timeout_ms)); + return recv_pirate_booty->pop_elems_with_timed_wait(buffs, boost::posix_time::milliseconds(timeout_ms)); } //state management for the vrt packet handler code @@ -71,7 +73,6 @@ struct usrp2_impl::io_impl{ bool recv_pirate_crew_raiding; alignment_buffer_type::sptr recv_pirate_booty; bounded_buffer<async_metadata_t>::sptr async_msg_fifo; - size_t recv_timeout_ms; }; /*********************************************************************** @@ -112,7 +113,7 @@ void usrp2_impl::io_impl::recv_pirate_loop( metadata.event_code = vrt_packet_handler::get_context_code<async_metadata_t::event_code_t>(vrt_hdr, if_packet_info); //print the famous U, and push the metadata into the message queue - if (metadata.event_code == async_metadata_t::EVENT_CODE_UNDERFLOW) std::cerr << "U"; + if (metadata.event_code & underflow_flags) std::cerr << "U"; async_msg_fifo->push_with_pop_on_full(metadata); continue; } @@ -222,7 +223,6 @@ size_t usrp2_impl::recv( rx_metadata_t &metadata, const io_type_t &io_type, recv_mode_t recv_mode, size_t timeout_ms ){ - _io_impl->recv_timeout_ms = timeout_ms; return vrt_packet_handler::recv( _io_impl->packet_handler_recv_state, //last state of the recv handler buffs, num_samps, //buffer to fill @@ -230,6 +230,6 @@ size_t usrp2_impl::recv( io_type, _io_helper.get_rx_otw_type(), //input and output types to convert _mboards.front()->get_master_clock_freq(), //master clock tick rate uhd::transport::vrt::if_hdr_unpack_be, - boost::bind(&usrp2_impl::io_impl::get_recv_buffs, _io_impl.get(), _1) + boost::bind(&usrp2_impl::io_impl::get_recv_buffs, _io_impl.get(), _1, timeout_ms) ); } diff --git a/host/lib/version.cpp.in b/host/lib/version.cpp.in new file mode 100644 index 000000000..f3a5afc45 --- /dev/null +++ b/host/lib/version.cpp.in @@ -0,0 +1,22 @@ +// +// Copyright 2010 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#include <uhd/version.hpp> + +std::string uhd::get_version_string(void){ + return "@CPACK_PACKAGE_VERSION@"; +} |