diff options
author | Brad King <brad.king@kitware.com> | 2019-02-21 18:37:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-25 13:24:28 (GMT) |
commit | 5c41386357977d931f73e3bb824080af795b3cd5 (patch) | |
tree | 45ecef4703540ce639600c28464e5c7313526c0f /Help/policy | |
parent | 82782379337fe922f96f4f19b8deae1fab6212fe (diff) | |
download | CMake-5c41386357977d931f73e3bb824080af795b3cd5.zip CMake-5c41386357977d931f73e3bb824080af795b3cd5.tar.gz CMake-5c41386357977d931f73e3bb824080af795b3cd5.tar.bz2 |
XLClang: Add policy CMP0089 to present as XL for compatibility
We now identify IBM's Clang-based XL compilers, which define
`__ibmxl__`, as `XLClang` rather than `XL`. In order to support
existing project code that checks for `XL`, add a policy whose OLD
behavior is to present the compiler id as `XL` and whose NEW behavior is
to present the compiler id as `XLClang` as we really detect it.
Diffstat (limited to 'Help/policy')
-rw-r--r-- | Help/policy/CMP0089.rst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Help/policy/CMP0089.rst b/Help/policy/CMP0089.rst new file mode 100644 index 0000000..e549e0c --- /dev/null +++ b/Help/policy/CMP0089.rst @@ -0,0 +1,30 @@ +CMP0089 +------- + +Compiler id for IBM Clang-based XL compilers is now ``XLClang``. + +CMake 3.15 and above recognize that IBM's Clang-based XL compilers +that define ``__ibmxl__`` are a new front-end distinct from ``xlc`` +with a different command line and set of capabilities. +CMake now prefers to present this to projects by setting the +:variable:`CMAKE_<LANG>_COMPILER_ID` variable to ``XLClang`` instead +of ``XL``. However, existing projects may assume the compiler id for +Clang-based XL is just ``XL`` as it was in CMake versions prior to 3.15. +Therefore this policy determines for Clang-based XL compilers which +compiler id to report in the :variable:`CMAKE_<LANG>_COMPILER_ID` +variable after language ``<LANG>`` is enabled by the :command:`project` +or :command:`enable_language` command. The policy must be set prior +to the invocation of either command. + +The OLD behavior for this policy is to use compiler id ``XL``. The +NEW behavior for this policy is to use compiler id ``XLClang``. + +This policy was introduced in CMake version 3.15. Use the +:command:`cmake_policy` command to set this policy to OLD or NEW explicitly. +Unlike most policies, CMake version |release| does *not* warn +by default when this policy is not set and simply uses OLD behavior. +See documentation of the +:variable:`CMAKE_POLICY_WARNING_CMP0089 <CMAKE_POLICY_WARNING_CMP<NNNN>>` +variable to control the warning. + +.. include:: DEPRECATED.txt |