CMP0205 — CMake 4.4.0 Documentation

# CMP0205

Added in version 4.3.

`file(CREATE_LINK)` with `COPY_ON_ERROR` copies directory content.

The `file(CREATE_LINK)` command's `COPY_ON_ERROR` option copies the source file to the destination as a fallback if linking it fails. If the source is a directory, CMake 4.2 and below create the destination directory but do not copy its contents. CMake 4.3 and above prefer to copy the directory contents too. This policy provides compatibility with projects that have not been updated to expect the contents to be copied.

The `OLD` behavior for this policy is to create the destination directory without copying contents. The `NEW` behavior for this policy to create the destination directory and copy contents from the source directory.

This policy was introduced in CMake version 4.3. It may be set by `cmake_policy()` or `cmake_minimum_required()`. If it is not set, CMake warns, and uses `OLD` behavior.

Note

The `OLD` behavior of a policy is deprecated by definition and may be removed in a future version of CMake.