Skip to content

fix(cmake): regression in include guard #5691

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
merged 1 commit into from
May 26, 2025

Conversation

henryiii
Copy link
Collaborator

Description

Proposed fix for #5686.

Suggested changelog entry:

  • Fix regression with include_guard addition.

@rwgk rwgk changed the title fix(cmake): regression in include gaurd fix(cmake): regression in include guard May 24, 2025
@petersteneteg
Copy link
Contributor

I can confirm that this fixes the issue that I found!

set(optional_global GLOBAL)
else()
include_guard(DIRECTORY)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FWIW, I think this would have been safe to put DIRECTORY here, since there's already a GLOBAL on the main CMakeLists.txt. But this is safer for now, especially in RC.

@henryiii henryiii merged commit 6e3e851 into pybind:master May 26, 2025
74 checks passed
@henryiii henryiii deleted the henryiii/fix/cmakegaurd branch May 26, 2025 16:26
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label May 26, 2025
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants