CMP0179 — CMake 4.1.4 Documentation

# CMP0179

Added in version 3.31.

De-duplication of static libraries on link lines keeps first occurrence. This policy is only relevant when policy `CMP0156` is set to `NEW`.

Based on the linker capabilities, the static libraries can be de-duplicated. See policy `CMP0156` for more information.

CMake 3.30 and below may choose to keep, on some platforms, the last occurrence of the static libraries rather than the fist occurrence when they are de-duplicated.

CMake 3.31 and above prefer to keep, on all platforms, the first occurrence of the static libraries when they are de-duplicated.

The `OLD` behavior for this policy is to keep, on some platforms, the last occurrence of the static libraries when they are de-duplicated. The `NEW` behavior for this policy is to keep the first occurrence of the static libraries when they are de-duplicated, regardless of the platform.

This policy was introduced in CMake version 3.31. It may be set by `cmake_policy()` or `cmake_minimum_required()`. If it is not set, CMake does not warn, 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.