Skip to content
Snippets Groups Projects
Commit 698f4c45 authored by Samuel Burbulla's avatar Samuel Burbulla Committed by Andreas Dedner
Browse files

Add custom command to configure dune-py after install_python.

parent 79c02934
Branches
Tags
1 merge request!932Merge of small MRs that make changes to the Python bindings
......@@ -125,15 +125,19 @@ function(dune_python_install_package)
# Determine a target name for installing this package
string(REPLACE "/" "_" targetname "install_python_${CMAKE_CURRENT_SOURCE_DIR}_${PYINST_PATH}")
set(CONFIGURE_DUNEPY -m dune configure)
# Add a custom target that globally installs this package if requested
add_custom_target(${targetname}
COMMAND ${Python3_EXECUTABLE} ${INSTALL_CMDLINE}
COMMAND ${Python3_EXECUTABLE} ${CONFIGURE_DUNEPY}
COMMENT "Installing the python package at ${PYINST_FULLPATH}"
)
# Add a custom command that triggers the configuration of dune-py
set(CONFIGURE_DUNEPY -m dune configure)
add_custom_command(TARGET ${targetname} POST_BUILD
COMMAND ${Python3_EXECUTABLE} ${CONFIGURE_DUNEPY}
)
add_dependencies(install_python ${targetname})
# Define rules for `make install` that install a wheel into a central wheelhouse
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment