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
0dae3998
Commit
0dae3998
authored
5 months ago
by
Santiago Ospina De Los Ríos
Browse files
Options
Downloads
Plain Diff
Merge branch 'cmake/fix_dune_add_pybind11_submodule' into 'master'
Fix dune_add_pybind11_submodule Closes
#394
See merge request
!1461
parents
89b80dc4
b5f78dad
No related branches found
No related tags found
2 merge requests
!1470
Fix wrong variable name to make target hash (2.10)
,
!1461
Fix dune_add_pybind11_submodule
Pipeline
#74799
waiting for manual action
Stage: .pre
Stage: test
Stage: code_quality
Stage: downstream
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/DuneAddPybind11Module.cmake
+2
-3
2 additions, 3 deletions
cmake/modules/DuneAddPybind11Module.cmake
python/dune/common/CMakeLists.txt
+9
-6
9 additions, 6 deletions
python/dune/common/CMakeLists.txt
with
11 additions
and
9 deletions
cmake/modules/DuneAddPybind11Module.cmake
+
2
−
3
View file @
0dae3998
...
...
@@ -124,9 +124,8 @@ function(dune_add_pybind11_submodule)
target_compile_definitions
(
${
PYBIND11_SUBMODULE_NAME
}
PRIVATE
${
PYBIND11_SUBMODULE_COMPILE_DEFINITIONS
}
)
# add all package flags
dune_target_enable_all_packages
(
${
PYBIND11_SUBMODULE_NAME
}
)
# minimal c++ standard required
target_compile_features
(
${
PYBIND11_SUBMODULE_NAME
}
PUBLIC cxx_std_17
)
# Link against Dune::Common
target_link_libraries
(
${
PYBIND11_SUBMODULE_NAME
}
PRIVATE Dune::Common
)
# link object file to parent module
target_link_libraries
(
${
PYBIND11_SUBMODULE_MODULE
}
PUBLIC
${
PYBIND11_SUBMODULE_NAME
}
)
...
...
This diff is collapsed.
Click to expand it.
python/dune/common/CMakeLists.txt
+
9
−
6
View file @
0dae3998
...
...
@@ -15,15 +15,18 @@ add_python_targets(common
)
dune_add_pybind11_module
(
NAME _common SOURCES _common.cc
)
target_link_libraries
(
_common PUBLIC Dune::Common
)
if
(
DUNE_ENABLE_PYTHONMODULE_PRECOMPILE
)
set
(
FV_NUMS 0 1 2 3 4
)
foreach
(
FV_NUM
${
FV_NUMS
}
)
dune_add_pybind11_submodule
(
NAME registerfvector_
${
FV_NUM
}
MODULE _common SOURCES registerfvector.cc
COMPILE_DEFINITIONS FV_NUM=
${
FV_NUM
}
)
foreach
(
FV_NUM RANGE 0 4
)
add_library
(
registerfvector_
${
FV_NUM
}
OBJECT registerfvector.cc
)
target_compile_definitions
(
registerfvector_
${
FV_NUM
}
PRIVATE FV_NUM=
${
FV_NUM
}
)
target_link_libraries
(
registerfvector_
${
FV_NUM
}
PRIVATE Dune::Common
)
# Register the object in the pybind11 module _common
target_link_libraries
(
_common PRIVATE registerfvector_
${
FV_NUM
}
)
endforeach
()
endif
()
set_property
(
TARGET _common PROPERTY LINK_LIBRARIES dunecommon APPEND
)
if
(
SKBUILD
)
install
(
TARGETS _common LIBRARY DESTINATION python/dune/common
)
...
...
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