mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
IBM XL C/C++ for Linux versions 13.1.6 and above no longer define `__IBMC__` or `__IBMCPP__` by default (see `-qxlcompatmacros`). Instead `__ibmxl__` now identifies the compiler along with some related new version macros. Fixes: #17784
15 lines
618 B
CMake
15 lines
618 B
CMake
|
|
set(_compiler_id_version_compute "
|
|
# if defined(__ibmxl__)
|
|
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ibmxl_version__)
|
|
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ibmxl_release__)
|
|
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ibmxl_modification__)
|
|
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__ibmxl_ptf_fix_level__)
|
|
# else
|
|
/* __IBMCPP__ = VRP */
|
|
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__IBMCPP__/100)
|
|
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__IBMCPP__/10 % 10)
|
|
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__IBMCPP__ % 10)
|
|
# endif
|
|
")
|