CMP0111.rst 1.1 KB

123456789101112131415161718192021222324252627
  1. CMP0111
  2. -------
  3. .. versionadded:: 3.19
  4. An imported target missing its location property fails during generation.
  5. :ref:`Imported Targets` for library files and executables require that
  6. their location on disk is specified in a target property such as
  7. :prop_tgt:`IMPORTED_LOCATION`, :prop_tgt:`IMPORTED_IMPLIB`, or a
  8. per-configuration equivalent. If a needed location property is not set,
  9. CMake 3.18 and below generate the string ``<TARGET_NAME>-NOTFOUND`` in
  10. its place, which results in failures of the corresponding rules at build
  11. time. CMake 3.19 and above prefer instead to raise an error during
  12. generation. This policy provides compatibility for projects that have
  13. not been updated to expect the new behavior.
  14. The ``OLD`` behavior of this policy is to generate the location of an imported
  15. unknown, static or shared library target as ``<TARGET_NAME>-NOTFOUND`` if not
  16. set.
  17. The ``NEW`` behavior is to raise an error.
  18. This policy was introduced in CMake version 3.19. CMake version |release|
  19. warns when the policy is not set and uses ``OLD`` behavior. Use the
  20. :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
  21. .. include:: DEPRECATED.txt