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

Open
bernhardmgruber opened this issue Nov 27, 2024 · 1 comment
Open

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

bernhardmgruber opened this issue Nov 27, 2024 · 1 comment
Labels
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Shared CMake, github, etc infrastructure
Projects
Status: Todo
Development

No branches or pull requests

2 participants