IMPORTED_GLOBAL.rst 1.0 KB

12345678910111213141516171819202122
  1. IMPORTED_GLOBAL
  2. ---------------
  3. Indication of whether an :ref:`IMPORTED target <Imported Targets>` is
  4. globally visible.
  5. The boolean value of this property is True for targets created with the
  6. ``IMPORTED`` ``GLOBAL`` options to :command:`add_executable()` or
  7. :command:`add_library()`. It is always False for targets built within the
  8. project.
  9. For targets created with the ``IMPORTED`` option to
  10. :command:`add_executable()` or :command:`add_library()` but without the
  11. additional option ``GLOBAL`` this is False, too. However, setting this
  12. property for such a locally ``IMPORTED`` target to True promotes that
  13. target to global scope. This promotion can only be done in the same
  14. directory where that ``IMPORTED`` target was created in the first place.
  15. Once an imported target has been made global, it cannot be changed back to
  16. non-global. Therefore, if a project sets this property, it may only
  17. provide a value of True. CMake will issue an error if the project tries to
  18. set the property to a non-True value, even if the value was already False.