Skip to content

fix: Work around CMake issue #26993 explicitly propagating extension definitions #417

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

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Jun 10, 2025

Due to CMake's lack of support for generator expressions in the SOURCE argument of set_property(), compile definitions associated with sources cannot be reliably applied via set_property() when conditional logic is used.

See https://gitlab.kitware.com/cmake/cmake/-/issues/26993

This patch documents the issue and ensures that compile definitions from built-in extensions are explicitly propagated to relevant targets using target_compile_definitions(), preserving intended build behavior.


Working toward addressing:

@jcfr jcfr enabled auto-merge (rebase) June 10, 2025 20:57
@jcfr jcfr disabled auto-merge June 10, 2025 21:09
@jcfr jcfr force-pushed the ensure-builtin-extension-definitions-are-propagated branch 2 times, most recently from 88fa787 to 4c7319b Compare June 10, 2025 21:47
jcfr added 2 commits June 11, 2025 09:55
…definitions

Due to CMake's lack of support for generator expressions in the `SOURCE`
argument of `set_property()`, compile definitions associated with sources
cannot be reliably applied via set_property() when conditional logic is used.

See https://gitlab.kitware.com/cmake/cmake/-/issues/26993

This patch documents the issue and ensures that compile definitions from
built-in extensions are explicitly propagated to relevant targets using
`target_compile_definitions()`, preserving intended build behavior.
@jcfr jcfr force-pushed the ensure-builtin-extension-definitions-are-propagated branch from 4c7319b to d44717c Compare June 11, 2025 13:56
@jcfr jcfr merged commit 01651ff into python-cmake-buildsystem:master Jun 11, 2025
28 checks passed
@jcfr jcfr deleted the ensure-builtin-extension-definitions-are-propagated branch June 11, 2025 15:38
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