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: Don't override global settings for VISIBILITY if set #2793

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

henryiii
Copy link
Collaborator

Description

Sometimes programmers want to control this, and while it can be changed after the fact, it's commonly set via a CMAKE_ variable; if that variable is set, we should respect that (like the CMAKE_INTERPROCEDURAL_OPTIMIZATION setting).

Closes #2479

Suggested changelog entry:

* Respect the setting for ``CMAKE_CXX_VISIBILITY_PRESET`` if defined.

Sometimes programmers want to control this, and while it can be changed after the fact, it's commonly set via a CMAKE_ variable; if that variable is set, we should respect that (like the CMAKE_INTERPROCEDURAL_OPTIMIZATION setting).
@henryiii henryiii added this to the v2.6.2 milestone Jan 14, 2021
Copy link
Collaborator

@YannickJadoul YannickJadoul left a comment

Choose a reason for hiding this comment

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

Yeah, this seems like a fair enough fix.

@henryiii henryiii merged commit 230fa53 into pybind:master Jan 14, 2021
@henryiii henryiii deleted the fix/cmake_vis branch January 14, 2021 13:31
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Jan 14, 2021
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Jan 25, 2021
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.

[BUG] pybind11_add_module forcing -fvisiblity=hidden is a bit too aggressive?
2 participants