CMP0002.rst 1.1 KB

12345678910111213141516171819202122232425262728
  1. CMP0002
  2. -------
  3. Logical target names must be globally unique.
  4. Targets names created with add_executable, add_library, or
  5. add_custom_target are logical build target names. Logical target
  6. names must be globally unique because:
  7. ::
  8. - Unique names may be referenced unambiguously both in CMake
  9. code and on make tool command lines.
  10. - Logical names are used by Xcode and VS IDE generators
  11. to produce meaningful project names for the targets.
  12. The logical name of executable and library targets does not have to
  13. correspond to the physical file names built. Consider using the
  14. OUTPUT_NAME target property to create two targets with the same
  15. physical name while keeping logical names distinct. Custom targets
  16. must simply have globally unique names (unless one uses the global
  17. property ALLOW_DUPLICATE_CUSTOM_TARGETS with a Makefiles generator).
  18. This policy was introduced in CMake version 2.6.0. CMake version
  19. |release| warns when the policy is not set and uses OLD behavior. Use
  20. the cmake_policy command to set it to OLD or NEW explicitly.
  21. .. include:: DEPRECATED.txt