cmake: fix macro names for nodiscard/unreachable feature flags#385
Open
huven wants to merge 1 commit intoPJK:masterfrom
Open
cmake: fix macro names for nodiscard/unreachable feature flags#385huven wants to merge 1 commit intoPJK:masterfrom
huven wants to merge 1 commit intoPJK:masterfrom
Conversation
CMake defined _CBOR_HAS_* while headers check CBOR_HAS_*, so the feature flags never took effect. Align the CMake definitions with the header checks.
ac38e64 to
784ff8d
Compare
Author
|
The bazel test failure seems unrelated to this PR. |
Author
|
It’s Bazel 9 behavior: cc_test is no longer a native rule and must be loaded from cc:defs.bzl. In examples/bazel/src/BUILD it’s used without being loaded, so Bazel errors out and then can’t find //src:hello. I'll leave that to another PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fix CMake feature flag macro names to match the header checks.
CMake defined
_CBOR_HAS_*while headers checkCBOR_HAS_*, so thefeature flags for
[[nodiscard]]and__builtin_unreachable()nevertook effect. This aligns the definitions.
Checklist
I have added testsI have updated the documentationAre there any breaking changes?If yes: I have marked them in the CHANGELOG (example)Does this PR introduce any platform specific code?Security: Does this PR potentially affect security?Performance: Does this PR potentially affect performance?