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. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.19
  19. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  20. .. include:: STANDARD_ADVICE.txt
  21. .. include:: DEPRECATED.txt