Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
09f800c1
Commit
09f800c1
authored
4 years ago
by
Dominic Kempf
Committed by
Andreas Dedner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add a DEPENDS option to dune_python_install_package
parent
481de635
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!960
refactor the way python is used in dune
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+4
-1
4 additions, 1 deletion
CMakeLists.txt
cmake/modules/DunePythonInstallPackage.cmake
+12
-3
12 additions, 3 deletions
cmake/modules/DunePythonInstallPackage.cmake
with
16 additions
and
4 deletions
CMakeLists.txt
+
4
−
1
View file @
09f800c1
...
...
@@ -24,7 +24,10 @@ add_subdirectory(share)
# if Python bindings are enabled, include necessary sub directories.
if
(
DUNE_ENABLE_PYTHONBINDINGS
)
add_subdirectory
(
python
)
dune_python_install_package
(
PATH
"python"
)
dune_python_install_package
(
PATH
"python"
DEPENDS _common _typeregistry
)
endif
()
# finalize the dune project, e.g. generating config.h etc.
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/DunePythonInstallPackage.cmake
+
12
−
3
View file @
09f800c1
...
...
@@ -14,6 +14,12 @@
#
# Parameters to add to any :code:`pip install` call (appended).
#
# .. cmake_param:: DEPENDS
# :multi:
# :argname: dep
#
# Other CMake targets that the installation of this target depends on.
#
# This function installs the python package located at the given path. It
#
# * installs it to the location specified with :ref:`DUNE_PYTHON_INSTALL_LOCATION` during
...
...
@@ -38,8 +44,11 @@ include_guard(GLOBAL)
function
(
dune_python_install_package
)
# Parse Arguments
set
(
MULTI ADDITIONAL_PIP_PARAMS
)
cmake_parse_arguments
(
PYINST
""
"PATH"
"
${
MULTI
}
"
${
ARGN
}
)
set
(
OPTION
)
set
(
SINGLE PATH
)
set
(
MULTI ADDITIONAL_PIP_PARAMS DEPENDS
)
include
(
CMakeParseArguments
)
cmake_parse_arguments
(
PYINST
"
${
OPTION
}
"
"
${
SINGLE
}
"
"
${
MULTI
}
"
${
ARGN
}
)
if
(
PYINST_UNPARSED_ARGUMENTS
)
message
(
WARNING
"Unparsed arguments in dune_python_install_package: This often indicates typos!"
)
endif
()
...
...
@@ -110,7 +119,7 @@ function(dune_python_install_package)
ALL
COMMAND
${
DUNE_PYTHON_VIRTUALENV_EXECUTABLE
}
${
INSTALL_CMDLINE
}
COMMENT
"Installing Python package at
${
PYINST_FULLPATH
}
into Dune virtual environment..."
DEPENDS
_common _typeregistry
DEPENDS
${
PYINST_DEPENDS
}
)
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment