Skip to content
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

fix(cmake): NO_EXTRAS in pybind11_add_module function partially working #5378

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

Hintay
Copy link
Contributor

@Hintay Hintay commented Sep 18, 2024

Description

The NO_EXTRAS parameter in the pybind11_add_module function was not fully effective, resulting in incomplete application of the intended build configuration. After investigation, it was discovered that the target_link_libraries(${target_name} PRIVATE pybind11::windows_extras) command was included twice in the CMake script. One of these instances occurred before the ARG_NO_EXTRAS condition was checked, which caused pybind11::windows_extras to be linked even when NO_EXTRAS was set. Another occurrence of this call can be found here. This caused the function to work only partially as intended.

Copy link
Collaborator

@henryiii henryiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, yes, I see the second usage.

@henryiii henryiii merged commit 1f8b4a7 into pybind:master Sep 19, 2024
78 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport needs changelog Possibly needs a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants