Revision 51806bc53227ecbdd63cbcce0a90d8c33f44c326 authored by Dmitry Yu. Naumov on 02 June 2021, 12:23:16 UTC, committed by Dmitry Yu. Naumov on 02 June 2021, 12:23:16 UTC
1 parent f2576d9
Raw File
CMakeLists.txt
ogs_add_library(
    ProcessLibSourceTermPython
    CreatePythonSourceTerm.cpp
    CreatePythonSourceTerm.h
    PythonSourceTerm.cpp
    PythonSourceTerm.h
    PythonSourceTermLocalAssembler.h
    PythonSourceTermPythonSideInterface.h
)

target_compile_definitions(
    ProcessLibSourceTermPython
    PUBLIC OGS_USE_PYTHON
           # Enabled elements
           OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM}
           OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER}
           $<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX>
           $<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID>
           $<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM>
           $<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID>
)

target_link_libraries(
    ProcessLibSourceTermPython PUBLIC BaseLib MathLib MeshLib NumLib
                                      ${Python3_LIBRARIES}
    PRIVATE pybind11::pybind11 spdlog::spdlog
)

# For the embedded Python module
ogs_add_library(
    ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp
    PythonSourceTermModule.h
)

target_link_libraries(
    ProcessLibSourceTermPythonModule PUBLIC ProcessLibSourceTermPython
                                            pybind11::pybind11
)
back to top