-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix build with GoogleTest 1.14.0 #2209
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2209 +/- ##
==========================================
- Coverage 77.32% 77.29% -0.03%
==========================================
Files 194 194
Lines 37742 37746 +4
==========================================
- Hits 29184 29177 -7
- Misses 8558 8569 +11 ☔ View full report in Codecov by Sentry. |
@andreasstieger Thanks for opening this issue! Would not it be enough to build only tests with C++14, or that would not work? Also we should update our CI to use latest Google tests... |
I think it is more than fair to apply a 10 year old language standard globally. Doing so certainly does not break anything in the CI. The more important question is why the CI did not show this? Some builders seem to download and build googletest, the tag is from 1.14.0 and this was not triggered? |
I believe it is of because Centos 7 (EOLing this June, 2024) has only GCC 4.8.5, which doesn't have 100% support of C++14, but could be wrong. Anyway, we didn't have a major need for any features from C++14 yet.
That's surprising for me as well, I'll check it out. From the CMakeLists it should use |
@andreasstieger Got it, in CI we download Google Test and build from sources, which sets standard to c++14. However while building with system GoogleTest this doesn't work. @ronaldtse Should we set standard to c++14 with this release, or wait for the June and v0.18.0 release? |
@andreasstieger Could you please specify on which system/which CMake call did you use? I tried to reproduce on clean Fedora 40 and system-installed gtest, but it still sets standard to 14 automatically (and I was unable to track down where it comes from). |
cmake invocation:
Full build: https://build.opensuse.org/package/show/security:privacy/rnp |
I think it's safer to set C++14 globally with 0.18.0. I hope this doesn't block 0.17.1. |
I do not see this related to 0.17.x or any RNP release at all. Instead this proposed change is related to a googletest v1.14.0 release. So this should not block anything, and can be perfectly worked around by distribution package maintainers, if they want to run tests during their builds. Still a bit concerned why CI did not flag this. |
GoogleTest 1.14.0 requires C++14
Thanks for the input. Finally was able to reproduce the problem. Looks like we introduced some changes since v0.17.0 which as a side effect enable c++14 during rnp_tests building. Would investigate further, to make sure that v0.17.1 compiles/builds as expected. |
Closing this as issues was fixed via #2212 . Thanks again for reporting! |
GoogleTest 1.14.0 requires C++14
Fixes: