CMP0142 — CMake 4.0.1-dirty Documentation

# CMP0142

Added in version 3.25.

The `Xcode` generator does not append per-config suffixes to library search paths.

In CMake 3.24 and below, the `Xcode` generator preceded each entry of a library search path with a copy of itself appended with `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`. This was left from very early versions of CMake in which per-config directories were not well modeled. Such paths often do not exist, resulting in warnings from the toolchain. CMake 3.25 and above prefer to not add such library search paths. This policy provides compatibility for projects that may have been accidentally relying on the old behavior.

The `OLD` behavior for this policy is to append `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)` to all library search paths. The `NEW` behavior is to not modify library search paths.

This policy was introduced in CMake version 3.25. 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.