Skip to content

ConfigureCheck: Fix detection of ALIGNOF_LONG and ALIGNOF_SIZE_T using compile-time checks #407

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

Merged

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented May 29, 2025

Avoids reliance on runtime checks using a series of compile-only tests with _Static_assert and alignof to identify the alignment of long and size_t.

The check iterates over common alignment candidates and uses try_compile() to identify the value enforced by the compiler.


Working toward addressing:

…g compile-time checks

Avoids reliance on runtime checks using a series of compile-only tests
with `_Static_assert` and `alignof` to identify the alignment of
`long` and `size_t`.

The check iterates over common alignment candidates and uses `try_compile()`
to identify the value enforced by the compiler.
@jcfr jcfr enabled auto-merge (rebase) May 29, 2025 13:36
@jcfr jcfr merged commit 002c9ae into python-cmake-buildsystem:master May 29, 2025
24 checks passed
@jcfr jcfr deleted the configurecheck-fix-alignof branch May 29, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant