aboutsummaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Add support for fedora rpm versioningmattprost2022-06-101-0/+1
| | | | | | | | | Adds cmake option for replacing dashes in the UHD Component version with underscores. This is necessary as Fedora package management is now enforcing the format <Package>-<Version>-<Release> for all rpm builds, so dashes in the UHD_VERSION from dev branches is not supported. Signed-off-by: mattprost <matt.prost@ni.com>
* cmake: Replace distutils with CMake for version checksAaron Rossetto2022-01-141-15/+26
| | | | | | | This commit replaces the use of distutils.version.LooseVersion() with CMake's version comparison operator, which implements relational version string checking in the same manner (i.e., comparing numeric components of a version string numerically).
* cmake: Set debug to -Og for Clang buildsSteven Koo2022-01-061-0/+1
| | | | | | This fails to link otherwise on macOS Signed-off-by: Steven Koo <steven.koo@ni.com>
* cmake: use LooseVersion to ensure correct version comparisonsLars Amsel2021-10-141-3/+3
| | | | | | current implementation uses version strings for comparisons. This led version 3.10 to be smaller than 3.6 which is obviously wrong. Use LooseVersion to have correct version comparison.
* cmake: Replace CMAKE_{SOURCE,BINARY}_DIR with UHD_*_DIRMartin Braun2021-09-101-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | See the CMake 3.8 documentation on these two variables: https://cmake.org/cmake/help/v3.8/variable/PROJECT-NAME_SOURCE_DIR.html https://cmake.org/cmake/help/v3.8/variable/CMAKE_SOURCE_DIR.html Under normal circumstances, these two are identical. For sub-projects (i.e., when building UHD as part of something else that is also a CMake project), only the former is useful. There is no discernible downside of using UHD_SOURCE_DIR over CMAKE_SOURCE_DIR. This was changed using sed: $ sed -i "s/CMAKE_SOURCE_DIR/UHD_SOURCE_DIR/g" \ `ag -l CMAKE_SOURCE_DIR **/{CMakeLists.txt,*.cmake}` $ sed -i "s/CMAKE_BINARY_DIR/UHD_BINARY_DIR/g" \ `ag -l CMAKE_BINARY_DIR **/{CMakeLists.txt,*.cmake}` At the same time, we also replace the CMake variable UHD_HOST_ROOT (used in MPM) with UHD_SOURCE_DIR. There's no reason to have two variables with the same meaning and different names, but more importantly, this means that UHD_SOURCE_DIR is defined even in those cases where MPM calls into CMake files from UHD without any additional patches. Shoutout to GitHub user marcobergamin for bringing this up.
* cmake: Fix VS names and use relative for imagesSteven Koo2021-08-041-1/+1
| | | | | | | | | | cmake has newer variables to identify specific Visual Studio version. This change updates to use those. This also changes how images files are globbed to be relative paths, which is useful if build files are moved from machine to machine. This case is possible in Azure Pipeline's CI. Signed-off-by: Steven Koo <steven.koo@ni.com>
* uhd: Update minimum version of dependenciesAaron Rossetto2021-06-281-5/+5
| | | | | | | | | | | The minimum version of the following dependencies have been updated for UHD 4.1: * GCC: 5.4.0 --> 6.3.0 * Clang: 3.8.0 --> 6.0.0 * Apple Clang: 600 --> 800 * Python: 3.5 --> 3.6 * Boost: 1.58 --> 1.65
* cmake: tests: Support qemu also for python based testsJoerg Hofrichter2020-08-041-29/+53
| | | | This requires python3 to be installed in the target sysroot
* cmake: tests: Added option to use QEMU for running unittestsJoerg Hofrichter2020-06-251-0/+29
| | | | | This is useful when cross-compiling UHD for other architectures like arm or aarch64.
* Revert "host: cmake: add boost unit_test_framework required iff ENABLE_TESTS=ON"Aaron Rossetto2020-05-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93acdfe3808ba8aca6c04cbf2474d6e8db39a0ee. The commit introduced an issue when building without specifying ENABLE_TESTS explicitly to CMake. Normally, if the user doesn't set ENABLE_TESTS, it gets set to ON by default, assuming the prerequisites are met. However, there's a chicken-and-egg problem here. UHDBoost.cmake takes the list of required Boost components from UHD_BOOST_REQUIRED_COMPONENTS and adds them to the Boost_LIBRARIES list. This happens before ENABLE_TESTS gets a default value, so the Boost unit test framework library is never added to this list, even if ENABLE_TESTS ends up getting set to ON later on by default in the script. But, moving LIBUHD_REGISTER_COMPONENT (the macro that sets ENABLE_TESTS to a default value) to go before UHDBoost.cmake is included won't work, because that macro needs variables set by UHDBoost.cmake. It may be possible to break the circular dependency by refactoring UHDBoost.cmake somewhat, but for the time being, master shouldn't be broken.
* host: cmake: add boost unit_test_framework required iff ENABLE_TESTS=ONGwenhael Goavec-Merou2020-04-291-1/+5
|
* Revert "cmake: Add ability to pass CXXFLAGS to CMake environment"Martin Braun2020-04-151-3/+0
| | | | This reverts commit 49ca8112c2777fcc4b81eff72ce59fb40fa0024d.
* cmake: Add ability to pass CXXFLAGS to CMake environmentAjith Saya2020-04-021-0/+3
| | | | CMAKE_CXX_FLAGS will now respect $CXX_FLAGS.
* uhd: paths: Harmonize around XDG Base Directory specificationMartin Braun2020-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Up until now, we completely ignore the XDG specification. This commit does the following to change that: - It uses XDG_DATA_HOME and XDG_CONFIG_HOME for cal and config data, respectively. - If config data is in ~/.uhd/uhd.conf, that is still accepted, but if it conflicts with $XDG_CONFIG_HOME/uhd.conf, it is ignored and a warning is displayed - The default location for cal data is thus ${HOME}/.local/share/uhd/cal on Unix, and %LOCALAPPDATA%\uhd\cal on Windows. This is a change in location! - The UHD_CONFIG_DIR environment variable was confusingly named and is now removed. It provided an alternative location than the home directory. The same purpose is now much better served by XDG_DATA_HOME and XDG_CONFIG_HOME. The specification can be found here: specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
* cmake/doxygen: Fix FPGA manual post-FPGA-mergeMartin Braun2020-02-061-15/+0
| | | | | | | While merging the FPGA code into the UHD codebase, the manual building process was not modified, resulting in either a link to the website instead of building the FPGA manual as part of the rest, or by using a residual submodule.
* uhd: Replace boost::regex with std::regexMartin Braun2019-11-261-1/+0
| | | | | | | | boost::regex was a requirement until the minimum version of gcc was increased. Since it is at version 5.3 now, using Boost.Regex is no longer necessary. This change is a pure search-and-replace; Boost and std versions of regex are compatible and use the same syntax.
* Remove proto-RFNoC filesMartin Braun2019-11-261-8/+1
| | | | | | | This commit removes all files and parts of files that are used by proto-RFNoC only. uhd: Fix include CMakeLists.txt, add missing files
* rfnoc: Add a new builder script for FPGA images based on eRFNoC.Lars Amsel2019-11-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The builder has two major jobs: * generate an image core file which reflects the FPGA image configuration given by the user * invoke Xilinx toolchain to actually build the FPGA image For this purpose it needs to know where to find the FPGA source tree. This tree can be give by the -F option. The code that represents the user configurable part of the image is written to a file called <device>_rfnoc_sandbox.v. To generate the file these configuration files are needed: * io_signatures.yml: A file describing the known IO signatures. This file is global for all devices and contains the superset of all signatures (not all signatures are used by all devices). It resides in usrp3/top/ of the tree given by -F. * bsp.yml: A file describing interfaces of a specific device such as AXIS transport interfaces or IO ports as well as device specific settings. It resides in usrp3/top/<device> of the tree given by -F. * <image>.yml: a file provided by the user with freely chosen name. It describes which elements the image should contain (RFNoC blocks, streaming endpoints, IO ports) and how to connect them. The file also contains image setting such as the CHDR width to be used. The script uses mako templates to generate the sandbox file. Before the template engine is invoked sanity checks are executed to ensure the configuration is synthactic correct. The script also build up structures to ease Verilog code generation in the template engine. The engine should not invoke more Python than echoing variables or iterating of lists or dictionaries. This eases debugging as errors in the template engine are hard to track and difficult to read for the user. All Python code is placed in a package called rfnoc. The templates used by the builder are also part of this package. image_builder.py contains a method called build_image which is the main entry point for the builder. It can also be utilized by other Python programs. To align with the existing uhd_image_builder there is also a wrapper in bin called rfnoc_image_builder which expects similar commands as the uhd_image_builder. For debugging purpuse the script can be invoked from host/utils using $ PYTHONPATH=. python bin/rfnoc_image_builder <options> When installed using cmake/make/make install the builder installs to ${CMAKE_INSTALL_PREFIX}bin and can be invoked without specifying a PYTHONPATH. One can also install the package using pip from host/utils $ pip install . Image config generation can also be done from GNU Radio Companion files. The required GRC files are merged into gr-ettus. Example usage: $ rfnoc_image_builder -F ~/src/fpgadev -d x310 \ -r path/to/x310_rfnoc_image_core.grc \ -b path/to/gr-ettus/grc Co-Authored-By: Alex Williams <alex.williams@ni.com> Co-Authored-By: Sugandha Gupta <sugandha.gupta@ettus.com> Co-Authored-By: Martin Braun <martin.braun@ettus.com>
* cmake: Bump dependency versions for UHD 4.0.0.0Martin Braun2019-11-261-11/+10
| | | | | | | | | | | | - Boost >= 1.58 - CMake >= 3.5.1 - gcc >= 5.4.0 - Clang >= 3.8, AppleClang >= 600 - Python >= 3.5 (Py2k no longer supported) - Numpy >= 1.11 - C++14 for lib, include may now use C++11 constructs. - Because there is no more code requiring C++03 syntax, we remove the include-specific clang-format file
* cmake: add UHDBoost.cmake and use it for building UHDMichael Dickens2019-10-151-40/+9
| | | | | | | | | Also install UHDBoost.cmake along with the CMake UHD find scripts, so that it can be used by external modules. Tweak the UHDConfig.cmake script so that, once installed, the new UHDBoost.cmake script is found. Note that the project using UHD must first find UHD before trying to find Boost. Also note that if the C++ standard is not set before UHDBoost is loaded, it will be set to that currently used by UHD: C++14.
* cmake: allow setting of PKG_DOC_DIR from the CMake commandlineMichael Dickens2019-10-091-1/+3
|
* cmake: Remove ENABLE_PYTHON3 flag and simplify Python detectionMartin Braun2019-05-241-28/+5
| | | | | | - Makes use of more modern find_package(Python2/3) if available - Moves almost all Python-related code to UHDPython.cmake - ENABLE_PYTHON3 is no longer necessary
* cmake: Change default value for ENABLE_RFNOC to ONMartin Braun2019-05-231-1/+1
| | | | | | | | | This means that by default: - Symbols get exported - Headers get installed - Examples get compiled The switch still exists and can be disabled.
* docs: Auto-generate build page with min deps versionsMartin Braun2019-04-241-0/+1
| | | | | | The build guide manual page now takes the min versions for the dependencies straight from CMake. This avoids having to update the manual whenever we bump depdendencies.
* cmake: Bump dependency min versionsMartin Braun2019-04-241-26/+21
| | | | | | | | | | - gcc >= 4.8 (same as before) - Clang >= 3.8 - CMake >= 3.5.1 - Boost >= 1.58 Note: This also removes version-specific hacks for older CMake versions. Now that we require 3.5.1 they are no longer necessary.
* lib: cmake: Fix MSVC options (add /bigobj)Trung Tran2019-02-251-1/+1
| | | | | | | | | MP and bigobj should be at compile options level instead of compile_flags(which are at target properties level). We have been setting these options incorrectly. They are currently not applied to any project. Signed-off-by: Trung Tran <trung.tran@ettus.com>
* python: Replace Boost.Python with PyBind11Martin Braun2019-02-221-18/+7
| | | | | | This does not change the Python API itself, but it is still a significant change. Most importantly, it removes the dependency on Boost.Python.
* cmake: Extend list of additional Boost versionsMartin Braun2019-01-221-0/+1
|
* cmake: use "MATCHES" instead of "STREQUAL" for "Clang"Michael Dickens2018-12-071-3/+3
| | | | + allows proper building with both AppleClang and native Clang.
* cmake: Improve logic for UHD_IMAGES_DIRA. Maitland Bottoms2018-11-151-2/+0
| | | | | A CMake option is either On or Off. UHD_IMAGES_DIR gets a sane default if not specified on the CMake command line.
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-141-329/+329
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* cmake: Bump CMake minimum version to 2.8.12Martin Braun2018-10-241-2/+2
| | | | | | This enables some interesting features we can now use in UHD, such as: - target_compile_options - add_compile_options
* python: Enable Python API on non-WindowsBrent Stapleton2018-08-011-1/+5
| | | | | | | | | On non-Windows platforms, enable the Python API by default in CMake. Enabling the Python API in Windows causes build failures- that is, we currently can't detect if the requirements are met in the Windows build system. Because of that, we'll leave it disabled by default for now.
* cmake: Fix version numberingMartin Braun2018-07-131-2/+2
| | | | | UHD-* branches were being detected as "development", and #cmakedefine does not like it when values are actually zero.
* python: Separating exposed Python data structuresPaul David2018-06-201-17/+37
| | | | | | | | | - Separating exposed Python data structures into logical sections - Exposes all of the multi_usrp API - Adds a layer of Python for documentation and adding helper methods - Adds improvements and fixes to the MultiUSRP object - Includes additional exposed data structures (like time_spec_t, etc.) - Add code to release the Python GIL during long C++ calls
* python: Initial commit of Python APIAndrej Rode2018-06-201-3/+30
| | | | | | | | | | Initial commit of the Python API using Boost.Python. Bind the MultiUSRP API for use in Python. Bindings intended to provide as complete coverage as possible. - Wrap most multi_usrp calls - Adding multi channel send/recv examples in examples/python - Adding setuptools support - Initial attempt at binding the UHD types and filters
* cmake: change minimium cmake version support to 2.8.2Trung Tran2018-06-121-1/+1
|
* cmake: Remove images downloader sectionMartin Braun2018-04-191-10/+0
| | | | This was replaced with the manifest.
* cmake: add manual override option to UHD_VERSIONAndrej Rode2018-03-071-0/+3
|
* lib: Add 'prefs' APIMartin Braun2018-02-201-1/+24
| | | | | | | | | | | | | This defines and reads configuration files that can be used to customize UHD's behaviour. On Unix systems, they default to: /etc/uhd/uhd.conf $APPDATA/.uhd/uhd.conf On Windows systems, it will look in: %ProgramData%/uhd/uhd.conf %AppData%/.uhd/uhd.conf
* uhd: Update license headersMartin Braun2018-02-191-0/+1
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* cmake: Re-add requirement for Python requestsBrent Stapleton2018-02-011-5/+5
| | | | Uncommenting a CMake check for the Python module requests.
* cmake: Check for minimum MSVC, bump MSVC min version to 14.0Martin Braun2018-01-171-7/+15
| | | | | | | - MSVC 14.0 is required to support a lot of the new C++11 features required for rpclib, among others. - Moved Boost minimum version variable to same spot as other minimum versions
* mpm/mpmd: Move to request_xport()/commit_xport() architectureMartin Braun2017-12-221-5/+5
| | | | | This commit combines code from various branches to finally enable both UDP and Liberio transports.
* cmake: Add extra flags to uhd project reduce Windows.h loadsTrung N Tran2017-12-221-0/+2
|
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* ddc/duc: enhance ddc/duc with new parametersRyan Marlow2017-12-201-2/+2
| | | | | | | | | | | | - NUM_HALFBANDS and CIC_MAX are no longer hard coded and are now readback regs. - both DDC and DUC use same encoding to enable halfbands (increment the number) - removed hacky hack & fixed get_output_rate/get_input_rate to include only valid rates based on NUM_HALFBANDS and CIC_MAX. - added compatibility number readback w/ warning/error messages - Updated images package to include new DDC/DUC (affects X-Series only) - Updated fpga-src submodule pointer
* Merge branch 'maint'Martin Braun2017-07-191-2/+2
|\
| * Preparing branch for 3.10.2.0 release.Martin Braun2017-07-181-2/+2
| | | | | | | | | | | | | | - Updated version string - Updated fpga-src submodule - Updated CHANGELOG - Updated images package
* | cmake: add coverage targetAndrej Rode2017-05-231-0/+6
| |