Ryan Volz
63210c2fc7
utils: Fix prefix determination in get_lib_path()
...
get_lib_path() uses the libuhd location on disk to dynamically
determine the installation prefix at runtime. This fix normalizes the
libuhd path before any path operations are done to extract the library
directory and then prefix directory.
Previously, using a non-normalized library path, the returned prefix
directory would be incorrect in some cases (e.g. when loaded through
GNU Radio). In these error cases, the libuhd path would be
$PREFIX/lib/./libuhd.so
(with a no-op /. inserted) which would result in a technically correct
library directory of `$PREFIX/lib/.` but an incorrect prefix directory
of `$PREFIX/lib`.
With the normalization fix, the libuhd path is corrected to
$PREFIX/lib/libuhd.so
and the subsequent path manipulation to get the library and prefix
directories will work as intended.
2020-07-20 10:46:58 -07:00
Ryan Volz
ce924d7a8f
lib: utils: Don't use hard-coded path constants
...
This replaces the package path constant with a runtime library path
lookup. The package path is taken to be the parent directory of the
library directory.
When boost >= 1.61 is not available, this maintains the current behavior
of using CMake to set path contants.
Runtime path determination is preferable for making a relocatable
library so that it is not necessary to do string substitution on
relocated binaries (as with, for example, building a conda package).
2020-05-05 12:48:02 -07:00
Martin Braun
ee520a9df5
uhd: Apply clang-format against all .cpp and .hpp files in host/
...
Note: template_lvbitx.{cpp,hpp} need to be excluded from the
list of files that clang-format gets applied against.
host/lib/dep is also excluded from this change.
2020-04-17 15:02:40 -07:00
Martin Braun
a99e89a689
lib: Add path_expandvars() internal API call
2018-02-20 16:23:46 -08:00
Martin Braun
ae5211d71d
uhd: Update license headers
...
All copyright is now attributed to "Ettus Research, a National
Instruments company".
SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b
Move all license headers to SPDX format.
2017-12-22 10:45:51 -08:00
Andrej Rode
26cc20847c
uhd: replace BOOST_FOREACH with C++11 range-based for loop
...
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
2017-02-10 16:44:33 -08:00
Ashish Chaudhari
1c2f56bbc1
Merge branch 'maint'
...
Conflicts:
host/lib/usrp/cores/gpio_core_200.cpp
host/lib/usrp/dboard/db_ubx.cpp
2016-02-18 17:40:47 -08:00
vkakade
83c1493e03
Rectified the usage of UHD_IMAGES_DIR_WINREG_KEY in search paths.
2016-02-11 08:47:05 -08:00
Martin Braun
17712af3b8
Merge branch 'maint'
2016-01-21 20:49:28 +01:00
Brooks Prumo
23ed1af481
uhd: add CMake flag for the Windows registry key to specify UHD images directory
2016-01-21 20:39:35 +01:00
Martin Braun
4dd7cea6e0
cmake: Proper selection of files for ENABLE_X300
2015-10-26 16:56:04 -07:00
Nicholas Corgan
6178184c93
paths: consistency in usage of string parameters
2015-08-12 08:32:01 -07:00
Nicholas Corgan
290b85a961
Fixed minor warnings
2015-07-24 10:38:15 -07:00
Martin Braun
b3bfba0f3e
uhd: Added args arg to print_utility_warning
2015-04-30 10:52:40 -07:00
Ashish Chaudhari
ec7eedcca8
Merge branch 'bhilburn/uhdcalibpath' into maint
2015-02-11 16:33:58 -08:00
Ben Hilburn
08267a8c02
Creating the $UHD_CONFIG_DIR env var, here used for custom cal data storage.
...
This is a renaming of the previously created $UHDCALIBPATH.
2015-02-11 16:28:35 -08:00
Ben Hilburn
b10c9dd446
uhd::paths - fixing get_app_path to use correct get_env_var function
...
Also added new enviornment variable, "UHDCALIBPATH", so that users can
use something other than system-required environment paths.
2015-02-10 15:56:50 -08:00
Ben Hilburn
064634b05c
uhd::paths: Fixed empty string in error message
2015-02-10 16:18:05 +01:00
Ben Hilburn
75d519706b
Merging new UHD_IMAGES_DIR utilities and bug fixes.
...
Also includes NI-USRP Windows Registry Key fixes.
2015-01-27 16:07:43 -08:00
Ben Hilburn
9e47ad607b
Squashed merge of Coverity fixes.
2013-11-27 12:11:23 -08:00
Nicholas Corgan
e6a1de6dd1
paths: get_module_paths adds share/uhd/modules to the list of applicable paths
2013-10-30 09:08:03 -07:00
Michael Dickens
a48dbb654e
utils: fix declaration of "env_path_sep" such that it is always initialized before it is used in the "get_env_paths" function, by moving it from the global scope to inside that function. This change allows UHD_STATIC_BLOCK(load_modules) to work correctly.
2013-10-28 20:58:46 -04:00
Josh Blum
6b2a212842
uhd: work on moving binaries to lib/uhd
2012-11-08 18:36:59 -08:00
Josh Blum
98074d0c29
uhd: added uhd::get_pkg_data_path
2012-06-05 17:59:44 -07:00
Josh Blum
8d5dc71d64
uhd: used shared get_tmp_path for logging as well
...
Moved some of the log.cpp tmp paths smarts into paths as well
2012-05-16 10:59:09 -07:00
Josh Blum
8459432067
usrp: basically working iq cal on tx
2011-11-10 20:22:54 -08:00
Josh Blum
00bc8d50d5
uhd: removed constants.hpp.in, replaced w/ per source compile defines
2011-04-19 16:58:12 -07:00
Josh Blum
06e10b5f46
uhd: use UHD_PKG_DATA_PATH environment variable to override the one in constants
...
The installer sets UHD_PKG_DATA_PATH, we can can handle transplanted builds.
2011-04-19 14:20:37 -07:00
Josh Blum
291a46b86e
uhd: specify the UHD_PKG_DATA_PATH once (since images shipped w/ drivers)
2011-04-14 09:34:37 -07:00
Josh Blum
4357f5d3c0
uhd: replaced instanced of std::exception with the uhd exceptions
2011-02-24 16:35:29 -08:00
Josh Blum
db1fd30da6
uhd: fixed maxosx bug, was resizing the transport buffer
...
but it cant be resized on macos and I messed up the code that blocked that behavior
reimplemented block in usrp2_impl, seems more correct here
2011-01-26 11:27:25 -08:00
Josh Blum
261bb80d73
uhd: update copyright dates on host code
2011-01-13 16:22:07 -08:00
Josh Blum
771b5cebda
uhd: integrated boost split or tokenizer into source files, remove string split from algorithms header
2011-01-06 15:38:56 -08:00
Josh Blum
d99e229719
uhd: added image utils code to search the images paths for image files
2010-08-19 17:10:16 -07:00
Josh Blum
7d110e73e6
uhd: added the concept of installer path (along with local path) for package data
2010-08-16 23:28:37 -07:00
Josh Blum
7b084e3af2
uhd: use cmake to convert the pkg data dir to native system format
2010-08-15 12:18:35 -07:00
Josh Blum
805d4a0cff
uhd: made split string utility function
2010-08-12 10:08:17 -07:00
Josh Blum
836c6bcda0
uhd: avoid segfaults - use CPP macros for paths and dont split empty string
2010-08-11 21:13:34 -07:00
Josh Blum
2a87970a9c
uhd: created library code to handle paths for images and modules
...
- read from environment variable paths
- utility functions to get paths and search for images
- modified load modules to call the utility functions
- added private header constants.hpp to contain cmake variables of interest
- modified version.cpp to use this constants file
2010-08-09 11:24:08 -07:00