Skip to content

fix: use classic extension handling unless otherwise requested #2462

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 2 commits into from
Sep 5, 2020

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Sep 4, 2020

WITH_SOABI is only defined in CMake 3.17+, and it doesn't really quite do the expected thing for PyPy (being fixed on the PyPy side). For now, let's use the classic method for adding the extension unless a user requests otherwise.

@henryiii henryiii force-pushed the fix/soabi branch 3 times, most recently from 7dcffee to 1d62aa0 Compare September 4, 2020 16:31
@wjakob
Copy link
Member

wjakob commented Sep 4, 2020

Regarding the test failure: maybe there is a difference between SO and EXT_SUFFIX after all? Looks great other than that!

@henryiii
Copy link
Collaborator Author

henryiii commented Sep 5, 2020

It has to work with SO, otherwise the classic mode would be broken. The problem was that the function runs in the calling scope, so it doesn't "capture" variables when it was defined (CMake needs a C++11 capture specifier ;) ). When using add_subdirectory, you are in a scope where the variable wasn't defined, causing a completely empty extension.

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