Skip to content

Conversation

@markmcclain
Copy link

Upstream Cmake docs specify that PythonInterp should be called before
PythonLibs[1]. Inconsistency is possible when called with PythonLib first
in some environments.

[1] https://cmake.org/cmake/help/latest/module/FindPythonInterp.html

@markmcclain markmcclain changed the title Ensure FIND_PACKGE PythonInterp called before PythonLibs Ensure FIND_PACKAGE PythonInterp called before PythonLibs Oct 28, 2021
Upstream Cmake docs specify that PythonInterp should be called before
PythonLibs[1].  In some environments, inconsistency is possible when called
out of order.

[1] https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
@mlschroe
Copy link
Member

mlschroe commented Feb 1, 2022

Don't you also need to adjust the first lines of the cmake file, so that you get python2 if both python2 and python3 are to be built?

@markmcclain
Copy link
Author

Python2 + Python3 works correctly. The problem is reproducible if python3.y and python3.y+n interpreters are available on the system.

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