-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Multiple CMake fixes and version updates to resolve compiler warnings #738
Conversation
I am liking where this is going! Thanks! |
I've tested that it builds without errors or warnings on Ubuntu 20.04, 22.04, Debian 10 and 11, and Arch Linux. I'll probably enable some good debugging/optimization flags but that's a PR for another time. |
The practice of declaring the Bind placeholders in the global namespace is deprecated. Setting BOOST_BIND_GLOBAL_PLACEHOLDERS will retain the old behavior.
The spdlog package sets SPDLOG_FMT_EXTERNAL internally, and then we re-declare it as SPDLOG_FMT_EXTERNAL=ON. This causes a warning. By simply setting SPDLOG_FMT_EXTERNAL, the declaration is the same and the warning stops
Boost.Math will require C++14 or greater in release 1.82, which is scheduled for July 2023. C++17 is the latest widely supported version so there seems to be no reason to not go to it now.
The current version of Eigen that is vendored in lib/lfsr is 5 to 6 years old (between commits 6bceebfab to 68e8f2b83). Additionally, increasing the C++ version results in warnings about std::unary_negate and std::binary_negate, which are deprecated in C++17 and removed in C++20. Eigen 3.3 contains a fix for this.
The CMake file to find the include dirs for gnuradio-osmosdr checks the wrong pkg module name, and has trailing paths appended.
Amazing - let's do this. I made a few small tweaks to also cleanup some of the code related warnings. |
i have nothing to add i just wanted to say wow what an impressive pull request looks like quite a bit of work went into this thanks Galen! |
Based on issue robotastic/trunk-recorder#738
Based on issue robotastic/trunk-recorder#738
The output of cmake and make was pretty noisy so I updated some stuff to clean that up. Change list:
BOOST_BIND_GLOBAL_PLACEHOLDERS
retains the current behaviorSPDLOG_FMT_EXTERNAL=ON
conflicts with the declaration ofSPDLOG_FMT_EXTERNAL
in the spdlog CMake instructions. Making the declaration identical resolves the conflict (removing the declaration means it doesn't get built right).std::unary_negate
andstd::binary_negate
, which are deprecated in C++17 and removed in C++20. The vendored version of Eigen is at least 5 years old, and the deprecation warning is fixed in Eigen 3.3. Eigen 3.4 has also been released and appears to work without issue, so I've updated the vendored library to that version.