Commit bd69bf7c authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Make sure only compatible python versions get used.

Fixes #196
parent 1e4da3a6
...@@ -2,6 +2,8 @@ if(NOT BUILD_SHARED_LIBS) ...@@ -2,6 +2,8 @@ if(NOT BUILD_SHARED_LIBS)
message(ERROR "Python bindings are only supported for shared libraries") message(ERROR "Python bindings are only supported for shared libraries")
endif() endif()
set(Python_ADDITIONAL_VERSIONS 3 2.7)
find_package(PythonInterp REQUIRED)
find_package(PythonLibsNew REQUIRED) find_package(PythonLibsNew REQUIRED)
pybind11_add_module(adios2py MODULE pybind11_add_module(adios2py MODULE
......
...@@ -95,6 +95,8 @@ list(INSERT CMAKE_MODULE_PATH 0 ...@@ -95,6 +95,8 @@ list(INSERT CMAKE_MODULE_PATH 0
) )
if(ADIOS2_USE_Python STREQUAL AUTO) if(ADIOS2_USE_Python STREQUAL AUTO)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
set(Python_ADDITIONAL_VERSIONS 3 2.7)
find_package(PythonInterp)
find_package(PythonLibsNew) find_package(PythonLibsNew)
if(PYTHONLIBS_FOUND) if(PYTHONLIBS_FOUND)
if(ADIOS2_HAVE_MPI) if(ADIOS2_HAVE_MPI)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment