-
Notifications
You must be signed in to change notification settings - Fork 14
fix: CMake language C++ only #419
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
base: master
Are you sure you want to change the base?
Conversation
|
Is this a case where a user would specify an md5 hash and you compare with what you get? Or is it entirely internal, and all you need is any hash function (and also |
Sadly it does have to be md5, as is for validating that resource and geometry files were downloaded correctly, and is compared to values already stored in the calibration db, which were also probably generated externally. I'm mildly annoyed that an md5 implementation is not provided by the standard library, and baffled that everyone on stackoverflow recommends using the openssl implementation. I remember having suffered mightily with broken OpenSSL dependencies post-Heartbleed when I first came to JLab. |
I've seen JLab projects include |
|
I'm perfectly fine with marking this as a |
Fix undefined behavior when checking data alignment
|
I haven't closed this PR as WONTFIX because I kind of like the noise reduction. I also like not mixing C and C++ code because they really are different languages at this point. Here's an attempt at a C++ port of md5 which hopefully fixes the PR. Do you guys think this is a good idea, or not? The biggest argument against this PR that I see is that implementation-defined behavior in C is undefined behavior in C++. I'm not sure I trust this code because UBSan won't run along all code paths. Maybe I need a static UB checker? Or maybe I should just pull in a pre-existing C++ md5 implementation, such as https://github.com/CommanderBubble/MD5 |
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iffy indentation.
|
Looking at the code, are you mostly worried about verifying the branches with different |
### Briefly, what does this PR introduce? Since JANA2 does not explicitly include only `LANGUAGES CXX` in the CMakeLists.txt (see JeffersonLab/JANA2#419), we must ensure a C compiler is available. ### What kind of change does this PR introduce? - [x] Bug fix (issue: https://eicweb.phy.anl.gov/containers/eic_container/-/jobs/6090505#L3722) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No.
JANA2 is a C++ only project. By default CMake sets
LANGUAGES C CXX, which causes JANA2 to search for and require a C compiler.