Skip to content

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