From d3364d6e9764163cba3dcc5b34ab63540163ac1f Mon Sep 17 00:00:00 2001 From: Chuck Atkins <chuck.atkins@kitware.com> Date: Wed, 26 Jul 2017 11:52:36 -0400 Subject: [PATCH] Adjust logic for enabling python --- bindings/python/CMakeLists.txt | 4 ---- cmake/DetectOptions.cmake | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 8403e7306..90d030a55 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -1,7 +1,3 @@ -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) diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake index a484a5957..5022c676d 100644 --- a/cmake/DetectOptions.cmake +++ b/cmake/DetectOptions.cmake @@ -94,7 +94,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${ADIOS2_SOURCE_DIR}/thirdparty/pybind11/pybind11/tools" ) if(ADIOS2_USE_Python STREQUAL AUTO) - if(BUILD_SHARED_LIBS) + if(SHARED_LIBS_SUPPORTED AND ADIOS2_ENABLE_PIC) set(Python_ADDITIONAL_VERSIONS 3 2.7) find_package(PythonInterp) find_package(PythonLibsNew) -- GitLab