CMP0089.rst 1.4 KB

123456789101112131415161718192021222324252627282930
  1. CMP0089
  2. -------
  3. Compiler id for IBM Clang-based XL compilers is now ``XLClang``.
  4. CMake 3.15 and above recognize that IBM's Clang-based XL compilers
  5. that define ``__ibmxl__`` are a new front-end distinct from ``xlc``
  6. with a different command line and set of capabilities.
  7. CMake now prefers to present this to projects by setting the
  8. :variable:`CMAKE_<LANG>_COMPILER_ID` variable to ``XLClang`` instead
  9. of ``XL``. However, existing projects may assume the compiler id for
  10. Clang-based XL is just ``XL`` as it was in CMake versions prior to 3.15.
  11. Therefore this policy determines for Clang-based XL compilers which
  12. compiler id to report in the :variable:`CMAKE_<LANG>_COMPILER_ID`
  13. variable after language ``<LANG>`` is enabled by the :command:`project`
  14. or :command:`enable_language` command. The policy must be set prior
  15. to the invocation of either command.
  16. The ``OLD`` behavior for this policy is to use compiler id ``XL``. The
  17. ``NEW`` behavior for this policy is to use compiler id ``XLClang``.
  18. This policy was introduced in CMake version 3.15. Use the
  19. :command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` explicitly.
  20. Unlike most policies, CMake version |release| does *not* warn
  21. by default when this policy is not set and simply uses ``OLD`` behavior.
  22. See documentation of the
  23. :variable:`CMAKE_POLICY_WARNING_CMP0089 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
  24. variable to control the warning.
  25. .. include:: DEPRECATED.txt