mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
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
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
|
|
||||||
set(_compiler_id_version_compute "
|
set(_compiler_id_version_compute "
|
||||||
/* __IBMC__ = VRP */
|
# if defined(__ibmxl__)
|
||||||
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__IBMC__/100)
|
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ibmxl_version__)
|
||||||
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__IBMC__/10 % 10)
|
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ibmxl_release__)
|
||||||
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__IBMC__ % 10)")
|
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ibmxl_modification__)
|
||||||
|
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__ibmxl_ptf_fix_level__)
|
||||||
|
# else
|
||||||
|
/* __IBMC__ = VRP */
|
||||||
|
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__IBMC__/100)
|
||||||
|
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__IBMC__/10 % 10)
|
||||||
|
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__IBMC__ % 10)
|
||||||
|
# endif
|
||||||
|
")
|
||||||
|
@@ -1,6 +1,14 @@
|
|||||||
|
|
||||||
set(_compiler_id_version_compute "
|
set(_compiler_id_version_compute "
|
||||||
/* __IBMCPP__ = VRP */
|
# if defined(__ibmxl__)
|
||||||
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__IBMCPP__/100)
|
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ibmxl_version__)
|
||||||
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__IBMCPP__/10 % 10)
|
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ibmxl_release__)
|
||||||
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__IBMCPP__ % 10)")
|
# 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
|
||||||
|
")
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
set(_compiler_id_pp_test "defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800")
|
set(_compiler_id_pp_test "defined(__ibmxl__) || (defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800)")
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/IBMCPP-C-DetermineVersionInternal.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/IBMCPP-C-DetermineVersionInternal.cmake")
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
set(_compiler_id_pp_test "defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800")
|
set(_compiler_id_pp_test "defined(__ibmxl__) || (defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800)")
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/IBMCPP-CXX-DetermineVersionInternal.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/IBMCPP-CXX-DetermineVersionInternal.cmake")
|
||||||
|
Reference in New Issue
Block a user