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

Increase minimum CMake version to 3.22 #663

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

stephenswat
Copy link
Member

Earlier versions of CMake were unable to properly configure GCC for C++20 compilation, opting to add the -std=c++2a flag instead of the -std=c++20 flag which broke the build. CMake 3.22 correctly sets the C++20 flag, and as such we are setting this as our new minimum version.

@stephenswat stephenswat added bug Something isn't working build This relates to the build system labels Aug 1, 2024
@stephenswat stephenswat requested a review from krasznaa August 1, 2024 14:53
Copy link
Member

@krasznaa krasznaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this is not enough. 😦 3.22 might be enough for the host code compilation, but not for CUDA. 😦

https://gitlab.kitware.com/cmake/cmake/-/blob/v3.22.0/Modules/Compiler/NVIDIA-CUDA.cmake

We need to go all the way to 3.26 for C++20 support with CUDA. 😱

https://gitlab.kitware.com/cmake/cmake/-/blob/v3.26.0/Modules/Compiler/NVIDIA-CUDA.cmake

I.e., this PR should request 3.26 in: https://github.com/acts-project/traccc/blob/main/device/cuda/CMakeLists.txt

@stephenswat stephenswat force-pushed the build/cmake_min_3_22 branch from f692387 to e7f5108 Compare August 1, 2024 23:03
@stephenswat
Copy link
Member Author

I added a CMake 3.26 requirement for the CUDA library.

Copy link
Member

@krasznaa krasznaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@stephenswat stephenswat force-pushed the build/cmake_min_3_22 branch from e7f5108 to fa990be Compare August 8, 2024 19:30
@stephenswat stephenswat enabled auto-merge August 8, 2024 19:30
Earlier versions of CMake were unable to properly configure GCC for
C++20 compilation, opting to add the `-std=c++2a` flag instead of the
`-std=c++20` flag which broke the build. CMake 3.22 correctly sets the
C++20 flag, and as such we are setting this as our new minimum version.
@stephenswat stephenswat merged commit 8740109 into acts-project:main Aug 8, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build This relates to the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants