mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
A resubmission of commit 11eaa3d7
in PR #2403 and PR #2443 and continues
the work in #2555 implementing Python bindings to the flow simulator.
The step_init() method initializes the simulation. It is required for the
Python script to run step_init() before calling the step() method (which
will be implemented in a later commit).
16 lines
662 B
CMake
16 lines
662 B
CMake
pybind11_add_module(simulators simulators.cpp SYSTEM)
|
|
|
|
set_target_properties( simulators PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/python/opm2 )
|
|
|
|
target_sources(simulators
|
|
PRIVATE
|
|
../../opm/simulators/utils/moduleVersion.cpp
|
|
../../flow/flow_ebos_blackoil.cpp)
|
|
|
|
target_link_libraries( simulators PRIVATE opmsimulators )
|
|
|
|
set(PYTHON_PACKAGE_PATH "site-packages")
|
|
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
|
|
|
install(TARGETS simulators DESTINATION ${DEST_PREFIX}${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PREFIX}/opm)
|