Commit ef1a1408 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon Committed by GitHub
Browse files

Merge pull request #200 from chuckatkins/fix-various-python-issues

Fix various python issues
parents 89584c78 bd69bf7c
......@@ -2,6 +2,8 @@ if(NOT BUILD_SHARED_LIBS)
message(ERROR "Python bindings are only supported for shared libraries")
endif()
set(Python_ADDITIONAL_VERSIONS 3 2.7)
find_package(PythonInterp REQUIRED)
find_package(PythonLibsNew REQUIRED)
pybind11_add_module(adios2py MODULE
......@@ -28,6 +30,9 @@ endif()
string(REGEX REPLACE "^${PYTHON_PREFIX}/" ""
CMAKE_INSTALL_PYTHONDIR "${PYTHON_SITE_PACKAGES}"
)
set(CMAKE_INSTALL_PYTHONDIR "${CMAKE_INSTALL_PYTHONDIR}"
CACHE INTERNAL "" FORCE
)
set_target_properties(adios2py PROPERTIES
OUTPUT_NAME adios2
LIBRARY_OUTPUT_DIRECTORY ${ADIOS2_BINARY_DIR}/${CMAKE_INSTALL_PYTHONDIR}
......
......@@ -95,6 +95,8 @@ list(INSERT CMAKE_MODULE_PATH 0
)
if(ADIOS2_USE_Python STREQUAL AUTO)
if(BUILD_SHARED_LIBS)
set(Python_ADDITIONAL_VERSIONS 3 2.7)
find_package(PythonInterp)
find_package(PythonLibsNew)
if(PYTHONLIBS_FOUND)
if(ADIOS2_HAVE_MPI)
......@@ -115,12 +117,12 @@ endif()
if(ADIOS2_USE_SysVShMem STREQUAL AUTO)
if(UNIX)
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(shmget "sys/ipc.h;sys/shm.h" HAVE_shmget)
if(HAVE_shmget)
set(ADIOS2_HAVE_SysVShMem ON)
else()
set(ADIOS2_HAVE_SysVShMem OFF)
endif()
CHECK_SYMBOL_EXISTS(shmget "sys/ipc.h;sys/shm.h" HAVE_shmget)
if(HAVE_shmget)
set(ADIOS2_HAVE_SysVShMem ON)
else()
set(ADIOS2_HAVE_SysVShMem OFF)
endif()
else()
set(ADIOS2_HAVE_SysVShMem OFF)
endif()
......
Markdown is supported
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