diff options
author | Brad King <brad.king@kitware.com> | 2018-03-05 18:42:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-06 12:43:04 (GMT) |
commit | eb1a9be4b63a807759ba81e4057219e1d6960eac (patch) | |
tree | bb0d3f27dd340e7a3ae40b09533e895c36a2671c /Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake | |
parent | ac925ec09e2dd4b373353d312e9e50b6165a66d0 (diff) | |
download | CMake-eb1a9be4b63a807759ba81e4057219e1d6960eac.zip CMake-eb1a9be4b63a807759ba81e4057219e1d6960eac.tar.gz CMake-eb1a9be4b63a807759ba81e4057219e1d6960eac.tar.bz2 |
XL: Recognize compilers identified by __ibmxl__
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
Diffstat (limited to 'Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake')
-rw-r--r-- | Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake b/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake index 73aa2b4..63c3e32 100644 --- a/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake +++ b/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake @@ -1,6 +1,14 @@ set(_compiler_id_version_compute " - /* __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)") +# 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 +") |