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

PYTHON_LIBRARY is not properly passed to SIRF, due to SuperBuild CMake bug #472

Closed
AnderBiguri opened this issue Jan 15, 2021 · 2 comments · Fixed by #473
Closed

PYTHON_LIBRARY is not properly passed to SIRF, due to SuperBuild CMake bug #472

AnderBiguri opened this issue Jan 15, 2021 · 2 comments · Fixed by #473

Comments

@AnderBiguri
Copy link
Contributor

Read #467 (comment) and subsequent comments for clarification and explanation.

@KrisThielemans
Copy link
Member

KrisThielemans commented Jan 15, 2021

CMake doc says

If you’d like to specify the installation of Python to use, you should modify the following cache variables:

PYTHON_LIBRARY             - path to the python library
PYTHON_INCLUDE_DIR         - path to where Python.h is found

However, that obviously implies that there's only 1 library (not both a release and debug library, as then PYTHON_LIBRARIES has the form optimized;lib1;debug;lib2).

See also #313 and #48

@KrisThielemans
Copy link
Member

In the spirit of backwards compatibility, and until we fix #313, I suggest we pass PYTHON_LIBRARY as we currently do only if PYTHON_LIBRARIES is actually an existing file. That way I don't think it can do any harm

KrisThielemans added a commit to KrisThielemans/SIRF-SuperBuild that referenced this issue Jan 15, 2021
- Created a variable PYTHONLIBS_CMAKE_ARGS that contains all
settings to be used.

- No longer pass PYTHON_INCLUDE_DIR from ...DIRS, nor
PYTHON_LIBRARY from ..LIBRARIES, but from the variable
itself. This caused problems when
there are multiple files, and in particular debug and release
Python libraries present.

Fixes SyneRBI#472
KrisThielemans added a commit to KrisThielemans/SIRF-SuperBuild that referenced this issue Jan 15, 2021
- Created a variable PYTHONLIBS_CMAKE_ARGS that contains all
settings to be used.

- No longer pass PYTHON_INCLUDE_DIR from ...DIRS, nor
PYTHON_LIBRARY from ..LIBRARIES, but from the variable
itself. This caused problems when
there are multiple files, and in particular debug and release
Python libraries present.

Fixes SyneRBI#472
KrisThielemans added a commit that referenced this issue Jan 18, 2021
fix/simplify Python CMake arguments

Fixes #472 
Fixes #448
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 a pull request may close this issue.

2 participants