Merge pull request #2948 from blattms/fix-setup.py-mult-lib

[bugfix] Make opm-common_PYTHON_LINKAGE a comma separated list.
This commit is contained in:
Markus Blatt 2022-02-02 09:44:34 +01:00 committed by GitHub
commit c5691477e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -404,6 +404,12 @@ if (OPM_ENABLE_PYTHON)
list(APPEND opm-common_PYTHON_LINKAGE "'${cjson_LIBRARIES}'")
endif()
# opm-common_PYTHON_LINKAGE is used verbatim in a listin python.
# Hence items need to be comma separated.
if (opm-common_PYTHON_LINKAGE)
string(REPLACE ";" "," SETUP_PY_LINKAGE "${opm-common_PYTHON_LINKAGE}")
endif()
configure_file (${PROJECT_SOURCE_DIR}/python/setup.py.in ${PROJECT_BINARY_DIR}/python/setup.py)
file(COPY ${PROJECT_SOURCE_DIR}/python/README.md DESTINATION ${PROJECT_BINARY_DIR}/python)
execute_process(COMMAND ${Python3_EXECUTABLE} target_name.py

View File

@ -70,7 +70,7 @@ ext_modules = [
undef_macros=["NDEBUG"],
include_dirs=[@SETUP_PY_PYBIND_INCLUDE_DIR@],
extra_compile_args=['-std=c++17', '-fopenmp', @SETUP_PY_FMT_FLAGS@],
extra_link_args=['-fopenmp', @opm-common_PYTHON_LINKAGE@]
extra_link_args=['-fopenmp', @SETUP_PY_LINKAGE@]
)
]