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

Using {fmt} to replace printf, iostream, and misc string operations #83

Merged
merged 22 commits into from
Nov 12, 2024

Conversation

jj1bdx
Copy link
Owner

@jj1bdx jj1bdx commented Nov 12, 2024

  • Mandate {fmt} 11.0.2 as a required library
    • Preparing for future C++23 std::print()
  • Refactor to use fmt functions for printing messages
    • Remove (f)printf, iostream, crude string operations
  • Refactor CMakeLists.txt

* Still preliminary: manual fixes required
* usage() is reimplemented with std::string usage string

```
clang-tidy --fix --fix-errors --config-file=./modernize-print.yaml -checks="modernize-use-std-print" main.cpp
```
* Fetch fmt 11.0.2 from GitHub
    * Ubuntu/Debian libfmt-dev is old and do not support <fmt/base.h>
* fmt 11.0.2 is statically linked to sfmbase
* airspy-fmradion is linked to sfmbase
* explicit linkage of airspy-fmradion to fmt is not required
@jj1bdx jj1bdx changed the base branch from main to dev November 12, 2024 03:42
@jj1bdx
Copy link
Owner Author

jj1bdx commented Nov 12, 2024

LGTM!

@jj1bdx jj1bdx merged commit 313d8c7 into dev Nov 12, 2024
@jj1bdx jj1bdx deleted the dev-libfmt branch November 12, 2024 03:43
@jj1bdx jj1bdx mentioned this pull request Dec 8, 2024
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