CMP0025.rst 1.3 KB

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