Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Help / policy / CMP0142.rst
1 CMP0142
2 -------
3
4 .. versionadded:: 3.25
5
6 The :generator:`Xcode` generator does not append per-config suffixes to
7 library search paths.
8
9 In CMake 3.24 and below, the :generator:`Xcode` generator preceded each
10 entry of a library search path with a copy of itself appended with
11 ``$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)``.  This was left from
12 very early versions of CMake in which per-config directories were not well
13 modeled.  Such paths often do not exist, resulting in warnings from the
14 toolchain.  CMake 3.25 and above prefer to not add such library search
15 paths.  This policy provides compatibility for projects that may have been
16 accidentally relying on the old behavior.
17
18 The ``OLD`` behavior for this policy is to append
19 ``$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`` to all library search paths.
20 The ``NEW`` behavior is to not modify library search paths.
21
22 This policy was introduced in CMake version 3.25.  Use the
23 :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
24 Unlike many policies, CMake version |release| does *not* warn
25 when this policy is not set and simply uses ``OLD`` behavior.
26
27 .. include:: DEPRECATED.txt