diff options
Diffstat (limited to 'Help/policy/CMP0111.rst')
-rw-r--r-- | Help/policy/CMP0111.rst | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Help/policy/CMP0111.rst b/Help/policy/CMP0111.rst index 37e5ad5..e327583 100644 --- a/Help/policy/CMP0111.rst +++ b/Help/policy/CMP0111.rst @@ -3,10 +3,17 @@ CMP0111 .. versionadded:: 3.19 -An imported target with a missing location fails during generation. +An imported target missing its location property fails during generation. -Prior to this the location would be generated as ``<TARGET_NAME>-NOTFOUND``, -which would result in build failures. +:ref:`Imported Targets` for library files and executables require that +their location on disk is specified in a target property such as +:prop_tgt:`IMPORTED_LOCATION`, :prop_tgt:`IMPORTED_IMPLIB`, or a +per-configuration equivalent. If a needed location property is not set, +CMake 3.18 and below generate the string ``<TARGET_NAME>-NOTFOUND`` in +its place, which results in failures of the corresponding rules at build +time. CMake 3.19 and above prefer instead to raise an error during +generation. This policy provides compatibility for projects that have +not been updated to expect the new behavior. The ``OLD`` behavior of this policy is to generate the location of an imported unknown, static or shared library target as ``<TARGET_NAME>-NOTFOUND`` if not |