dune_add_pybind11_moduleΒΆ
dune_add_pybind11_module(
NAME name
[SOURCES source1 [source2 ...]]
[EXCLUDE_FROM_ALL]
[COMPILE_DEFINITIONS def1 [def2 ...]]
[CMAKE_GUARD condition1 [condition2 ...]]
)
- NAME
name of the Python module
- SOURCES
source files to build shared library
If this parameter is omitted, <name>.cc will be used if it exists.
- EXCLUDE_FROM_ALL
exclude this module from the all target
- COMPILE_DEFINITIONS
A set of compile definitions to add to the target. Only definitions beyond the application of add_dune_all_flags have to be stated.
- CMAKE_GUARD
A number of conditions that CMake should evaluate before adding this module. Use this feature instead of guarding the call to
dune_add_pybind11_module
with anif
clause.The passed condition can be a complex expression like ( A OR B ) AND ( C OR D ). Mind the spaces around the parentheses.
Example: Write CMAKE_GUARD dune-foo_FOUND if you want your module to only build when the dune-foo module is present.