CMP0025.rst 1.3 KB

1234567891011121314151617181920212223242526272829
  1. CMP0025
  2. -------
  3. Compiler id for Apple Clang is now ``AppleClang``.
  4. CMake 3.0 and above recognize that Apple Clang is a different compiler
  5. than upstream Clang and that they have different version numbers.
  6. CMake now prefers to present this to projects by setting the
  7. :variable:`CMAKE_<LANG>_COMPILER_ID` variable to ``AppleClang`` instead
  8. of ``Clang``. However, existing projects may assume the compiler id for
  9. Apple Clang is just ``Clang`` as it was in CMake versions prior to 3.0.
  10. Therefore this policy determines for Apple Clang which compiler id to
  11. report in the :variable:`CMAKE_<LANG>_COMPILER_ID` variable after
  12. language ``<LANG>`` is enabled by the :command:`project` or
  13. :command:`enable_language` command. The policy must be set prior
  14. to the invocation of either command.
  15. The OLD behavior for this policy is to use compiler id ``Clang``. The
  16. NEW behavior for this policy is to use compiler id ``AppleClang``.
  17. This policy was introduced in CMake version 3.0. Use the
  18. :command:`cmake_policy` command to set this policy to OLD or NEW explicitly.
  19. Unlike most policies, CMake version |release| does *not* warn
  20. by default when this policy is not set and simply uses OLD behavior.
  21. See documentation of the
  22. :variable:`CMAKE_POLICY_WARNING_CMP0025 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
  23. variable to control the warning.
  24. .. include:: DEPRECATED.txt