# CMP0210

Added in version 4.3.

`CMAKE_<LANG>_LINK_FLAGS` adds link flags to all target types.

In CMake 4.2 and below, `CMAKE_<LANG>_LINK_FLAGS` held flags relevant to target creation and applied when linking executables only. It was undocumented and originally intended for internal use only, but still available for projects and users to set in order to control linking behavior.

CMake 4.3 and above repurpose this variable to add per-language link flags for all target types that link (executables, shared libraries, and module libraries).

This policy provides compatibility with projects that relied on this variable and have not been updated to be aware of the change.

The `OLD` behavior for this policy is to apply `CMAKE_<LANG>_LINK_FLAGS` to invocations of the compiler which drive linking for executables only. The `NEW` behavior is to apply the flags to all target types.

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 when `CMAKE_<LANG>_LINK_FLAGS` is set, 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.