CMP0038.rst 663 B

12345678910111213141516171819
  1. CMP0038
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: include/REMOVED_PROLOGUE.rst
  5. Targets may not link directly to themselves.
  6. CMake 2.8.12 and lower allowed a build target to link to itself directly with
  7. a :command:`target_link_libraries` call. This is an indicator of a bug in
  8. user code.
  9. The ``OLD`` behavior for this policy is to ignore targets which list themselves
  10. in their own link implementation. The ``NEW`` behavior for this policy is to
  11. report an error if a target attempts to link to itself.
  12. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0
  13. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  14. .. include:: include/REMOVED_EPILOGUE.rst