DuneEnableAllPackages¶
Commands for simplified package flag handling in the DUNE build system.
- dune_enable_all_packages¶
Register all discovered package flags and libraries for subsequent targets in the current directory scope and its subdirectories.
dune_enable_all_packages( [INCLUDE_DIRS <dirs...>] [COMPILE_DEFINITIONS <defs...>] [COMPILE_OPTIONS <opts...>] [MODULE_LIBRARIES <libs...>] [VERBOSE] [APPEND] )
This command provides a simplified mode in which all collected external package flags are applied automatically to targets created later in the module.
INCLUDE_DIRSAdditional include directories added to all subsequent targets.
COMPILE_DEFINITIONSAdditional compile definitions added to all subsequent targets.
COMPILE_OPTIONSAdditional non-definition compile options added to all subsequent targets.
MODULE_LIBRARIESLibraries from the current module that should participate in the automatic linking setup. If programs in the module should link to those libraries automatically, they must be listed here.
VERBOSEPrint the resulting compile flags, linked libraries, and include directories during configuration.
APPENDAppend the provided flags to the global collection instead of prepending them.
If used, this command must be called in the top-level
CMakeLists.txtbefore adding subdirectories. For modern module libraries, preferdune_add_library()and explicit target properties when possible.
- dune_target_enable_all_packages¶
Add all currently registered package flags to specific targets.
dune_target_enable_all_packages(TARGETS <targets...>)
TARGETSThe targets receiving the currently registered package flags.
The added flags use
PUBLICscope for compiled libraries andINTERFACEscope otherwise.
- dune_register_package_flags¶
Register package-specific include paths, compile flags, and link libraries.
dune_register_package_flags( [INCLUDE_DIRS <dirs...>] [COMPILE_DEFINITIONS <defs...>] [COMPILE_OPTIONS <opts...>] [LIBRARIES <libs...>] [APPEND] )
INCLUDE_DIRSInclude directories required by the external package.
COMPILE_DEFINITIONSCompile definitions required by the external package.
COMPILE_OPTIONSCompile options required by the external package.
LIBRARIESLibraries that should be linked for the external package. The order of the input is preserved.
APPENDAppend the specified values to the global collection instead of prepending them.
This command is primarily intended for custom
FindFoomodules or for integrating external find modules that cannot be modified directly.
- dune_library_add_sources¶
Register sources for a module library created through the automatic package handling workflow.
dune_library_add_sources(<module_library> SOURCES <sources...>)
module_libraryThe name of the module library target.
SOURCESSource files added to the DUNE module library
module_library.
The target must have been created earlier by
dune_enable_all_packages()in the current module.