remove cmake logic for -fconcepts
and -fconcepts-ts
flags
#379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm suggesting that we remove the logic in our cmake that tries to add the
-fconcepts
and-fconcepts-ts
flags.First of all, the
-fconcepts-ts
branch is broken, because the condition checksCOMPILER_SUPPORTS_FCONCEPTS
instead ofCOMPILER_SUPPORTS_FCONCEPTS_TS
, so it wasn't used anyway.Secondly, pretty much every modern compiler will enable this if you enable
-std=c++20
, and we only add this flag if we enable-std=c++20
. In the rare cases someone is trying to build mdspan on a platform that doesn't do this, they can simply add-DCMAKE_CXX_FLAGS=-fconcepts
to their cmake command line invocation or preset.Note that us manually adding this flag breaks builds in small niche use cases (that can easily be worked around); i.e. when using
CMAKE_CXX_CLANG_TIDY
with gcc as clang does not recognize the flag but it is forced on. So the motivation for this is pretty minor but I think it would be good to clean up some of our cmake anyway.