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

[FEA]: Enable assertions by default in CMake Debug builds #2975

Closed
bernhardmgruber opened this issue Nov 27, 2024 · 2 comments · Fixed by #2986
Closed

[FEA]: Enable assertions by default in CMake Debug builds #2975

bernhardmgruber opened this issue Nov 27, 2024 · 2 comments · Fixed by #2986
Assignees
Labels
2.8.0 target for 2.8.0 release infrastructure Shared CMake, github, etc infrastructure

Comments

@bernhardmgruber
Copy link
Contributor

I got asked by someone what the state of the art way to enable assertions, e.g. to trigger on OOB access on a cuda::std::span is for CCCL. I replied that we cannot do anything for plain nvcc (yet), because we don't know whether the users intends to have a debug or release build. But if CCCL is consumed via CMake, we would look at the CMAKE_BUILD_TYPE and define CCCL_ENABLE_ASSERTIONS. Or are we?

I did not find where CMake would define CCCL_ENABLE_ASSERTIONS when any of the CCCL libraries is imported, so I conclude that we don't enable assertions anywhere. I think we should enable them for CMake Debug builds.

@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 27, 2024
@bernhardmgruber bernhardmgruber added the infrastructure Shared CMake, github, etc infrastructure label Nov 27, 2024
@jrhemstad
Copy link
Collaborator

I think we should enable them for CMake Debug builds.

Agreed.

@bernhardmgruber bernhardmgruber added the 2.8.0 target for 2.8.0 release label Nov 28, 2024
@bernhardmgruber bernhardmgruber self-assigned this Nov 28, 2024
@bernhardmgruber
Copy link
Contributor Author

bernhardmgruber commented Nov 28, 2024

@Kh4ster would love to have this soon

bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Nov 28, 2024
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Nov 28, 2024
@miscco miscco closed this as completed in 2a12739 Nov 30, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Nov 30, 2024
davebayer pushed a commit to davebayer/cccl that referenced this issue Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8.0 target for 2.8.0 release infrastructure Shared CMake, github, etc infrastructure
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants