summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-07 12:11:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-07 12:12:02 (GMT)
commit4f29bf56724aa8a71ce85b540f6b620454692ade (patch)
tree2193136ede3eebef6d8f24d0d2e7ed71ef089755 /Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
parent086f84aa20ac975ddf85ddf74434c13e00e9c9e6 (diff)
parenteb1a9be4b63a807759ba81e4057219e1d6960eac (diff)
downloadCMake-4f29bf56724aa8a71ce85b540f6b620454692ade.zip
CMake-4f29bf56724aa8a71ce85b540f6b620454692ade.tar.gz
CMake-4f29bf56724aa8a71ce85b540f6b620454692ade.tar.bz2
Merge topic 'xl-new-compiler-macros'
eb1a9be4b6 XL: Recognize compilers identified by __ibmxl__ Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Chuck Atkins <chuck.atkins@kitware.com> Merge-request: !1820
Diffstat (limited to 'Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake')
-rw-r--r--Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake b/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
index 899e284..e5b9741 100644
--- a/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
+++ b/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake
@@ -1,6 +1,14 @@
set(_compiler_id_version_compute "
- /* __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)")
+# 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
+ /* __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
+")