CMP0089.rst 1.4 KB

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