DuneSymlinkOrCopy¶
Convenience commands to expose files from the source tree inside the build tree by copying or symlinking them.
- dune_add_copy_command¶
Add a custom command that copies a source-tree file into the current build directory.
dune_add_copy_command(<filename>)
filenamePath to a file relative to the current source directory.
This command only creates the custom command for the copied output file. It does not add a top-level target by itself.
- dune_add_copy_target¶
Add a custom target that copies a source-tree file into the current build directory.
dune_add_copy_target(<target-name> <filename>)
target-nameName of the custom target to create.
filenamePath to a file relative to the current source directory.
The created target depends on the copied file output created by
dune_add_copy_command().
- dune_add_copy_dependency¶
Add a file copy step as a dependency of an existing target.
dune_add_copy_dependency(<target> <filename>)
targetExisting target that should depend on the copied file.
filenamePath to a file relative to the current source directory.
This command creates an auxiliary copy target and adds it as a dependency of
target.
- dune_symlink_to_source_tree¶
Create directory symlinks from the build tree back into the source tree.
dune_symlink_to_source_tree([NAME <link-name>])
NAMEName of the symlink created in each build directory. The default is
src_dir.
Call this from a top-level
CMakeLists.txtto create a symlink in every build-tree subdirectory that points to the corresponding source directory. On Windows, a warning is issued instead.
- DUNE_SYMLINK_TO_SOURCE_TREE¶
If set to
TRUE, the functionality ofdune_symlink_to_source_tree()is enabled globally for a module.
- DUNE_SYMLINK_RELATIVE_LINKS¶
If set to
TRUE, relative symlinks are created instead of absolute ones.
- dune_symlink_to_source_files¶
Create symlinks, or copies on Windows, for selected source files in the current build directory.
dune_symlink_to_source_files( FILES <files>... [DESTINATION <relative-path>] )
FILESFiles relative to the current source directory that should be mirrored into the build directory.
DESTINATIONRelative destination directory below the current build directory.
On Windows, copying is used as a fallback because symlink creation is not generally available.