INSTALL_OBJECT_NAME.rst 1017 B

1234567891011121314151617181920212223242526
  1. INSTALL_OBJECT_NAME
  2. -------------------
  3. .. versionadded:: 4.2
  4. Set the installed object name (without the object extension) of the source
  5. file. An empty string value disables custom object naming. The value must be a
  6. relative path, and may not include special directory components (e.g.,
  7. ``..``).
  8. Note that the object name might not be used as-is in some
  9. :prop_tgt:`INSTALL_OBJECT_NAME_STRATEGY` strategies. It may be changed as
  10. the strategy requires to fulfill its goals.
  11. This property supports
  12. :manual:`generator expressions <cmake-generator-expressions(7)>`.
  13. .. note::
  14. No collision resistance within a target is performed by CMake. When using
  15. this property, collisions must be avoided in the project code. CMake has a
  16. number of source files it generates that also create object files that may
  17. collide with a given custom name. These include:
  18. * Generated PCH source files (``cmake_pch``)
  19. * Generated Unity compilation files (``unity_...``)
  20. * Qt autogen sources (``moc_compilations.cpp``)