-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add infrastructure for working with concepts #631
Conversation
3c15a6e
to
0332b67
Compare
1423328
to
8b5666e
Compare
Okay it took some faffing about because of CMake but this is ready to go. |
53213c8
to
f91bc81
Compare
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.
I do not like the change to ci_setup.sh
. It should not be in the business of making decisions about compiler flags like that. 😦
I remember that you found that older CMake versions don't respect CMAKE_CUDA_STANDARD
as they should. But then, let's do something similar to what we settled on in acts-project/acts#3318 with @paulgessinger. That the CI configuration YAML would specify some flags explicitly, using CMAKE_CUDA_FLAGS
.
Yes, it's a bit fragile, but what's going on in this PR is quite fragile as well.
Setting Edit: it also causes CMake to ignore it's own toolchain-specific default flags. |
This commit adds the `TRACCC_CONSTRAINT` macro which acts as a concept in C++20 builds, and simply acts as the `typename` keyword in builds with older standards. It also adds the `TRACCC_ENFORCE_CONCEPTS` CMake flag which will throw an error if concepts are not available.
f91bc81
to
998fc03
Compare
Updated! |
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.
Unfortunately you are correct that setting CMAKE_CUDA_FLAGS
makes the configuration ignore the $CUDAFLAGS
environment variable. 😦 Which can indeed cause some problems. 😦
I believe that in the single job in which we need to force -std=c++20
on CUDA, it's fine to have $CUDAFLAGS
ignored. So, just since this code setup is simpler, let's go with this anyway.
P.S. We will need to test C++20 with SYCL as well later on, but it's fine not to worry about that in this PR.
This commit adds the
TRACCC_CONSTRAINT
macro which acts as a concept in C++20 builds, and simply acts as thetypename
keyword in builds with older standards. It also adds theTRACCC_ENFORCE_CONCEPTS
CMake flag which will throw an error if concepts are not available.