Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake improvements and compiler warning fixes #810

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nzqo
Copy link

@nzqo nzqo commented Nov 12, 2024

Pull Request Details

I extracted these changes from my other MR that was closed just now (#679) without any changes to the examples. The original changes were made over a year ago and after rebasing a few of the fixes done there have already been committed in other MRs. What remains is rather little, so should hopefully pose no problems to merge

Description

Basically, after rebasing onto the current version of uhd, here's what these changes still entail:

  • install_name wasnt manually set in CMake, which caused a warning in newer CMake versions due to breaking policy changes
  • Version range in DPDK find package module wasnt handled properly. Fixed by simply adding HANDLE_VERSION_RANGE flag
  • Substituted use of sprintf with safer and more idiomatic snprintf variant
  • Included boost as System dependency. This effectively suppresses compiler warnings from included boost headers so one can focus on the uhd ones
  • Fixed compiler warnings (unused variables and missing copy assignment)
  • Some minor comment formatting improvements for readability.

Which devices/areas does this affect?

Minor changes to the build system and the host library.

Testing Done

Since this affects mainly the build system, testing was building and verifying that CMake and compiler warnings were fixed.

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project. See CODING.md.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes, and all previous tests pass.
  • I have checked all compat numbers if they need updating (FPGA compat,
    MPM compat, noc_shell, specific RFNoC block, ...)

nzqo and others added 6 commits November 12, 2024 11:22
Newer versions of cmake do not set install_name, so we need to do it
ourselves.
FindDPDK module did not properly handle version range before, this
change fixes this.
Also made boost a system dependency to suppress compiler warnings from
it.
Some minor formatting, spaces etc
This change fixes a few annoying compiler warnings. Mostly, those
are related to unused variables which are simply suppressed.
Also fixes a missing virtual destructor which could have resulted
in memory issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant