Define minimum C++ version using ROOT_CXX_STANDARD#1700
Define minimum C++ version using ROOT_CXX_STANDARD#1700KrisThielemans merged 7 commits intoUCL:masterfrom
Conversation
Up to standards ✅🟢 Issues
|
KrisThielemans
left a comment
There was a problem hiding this comment.
possibly still add a quick line in the release notes ("If CERN ROOT is used, set minimum C++ standard from its ROOT_CXX_STANDARD variable, if it exists."
|
Why draft? If the tests work, I'm fine to merge. |
|
I proposed conditional upgrade as the minimum C++17 was set in the snippet below. However, I agree without condition it look more clean, while at config stage it costs nothing to reset it back to version 17. Line 38 in 0d6ab3d My inital idea for draft was to give me some time to test the build with ROOT installed. Let's merge this PR as it shouldn't affect the use cases, where ROOT is not used. Any compatibility problems, when builiding STIR with ROOT installed, could be addressed as separate issue. |
|
Switching back to draft as currently it fails for standalone ROOT install. |
|
Hi @KrisThielemans, I have updated the PR. Previously, ROOT >= 6.30 was assumed to require C++20. However, pre-built ROOT distributions (including conda) use C++17 by default. I therefore propose using C++17 as the default for ROOT < 6.32. |
Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
|
Thanks! |
Changes in this pull request
Adjusted CMake recipe to define minimum C++ version using ROOT_CXX_STANDARD.
Testing performed
The definition of the build variables has been tested on MacOS for
root==6.28,6.30,6.32.However, I could not validate if it builds successfully due to conflict of dependencies between
root,STIR, andlibparallelproj=2(conda installations).Related issues
Fixes #1677
Checklist before requesting a review
documentation/release_XXX.mdhas been updated with any functionality change (if applicable)Contribution Notes
Please tick the following: