summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/XLClang-C-DetermineCompiler.cmake
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2019-02-05 16:48:00 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-25 13:24:28 (GMT)
commit90c6156aa8272ec9811647d9b6c87d7ee4326e35 (patch)
tree752a820e1adbbdd6604c0a39e39ffaf7f32c44bc /Modules/Compiler/XLClang-C-DetermineCompiler.cmake
parente0231fe439fef3e5f64912f65393e756c4473cc8 (diff)
downloadCMake-90c6156aa8272ec9811647d9b6c87d7ee4326e35.zip
CMake-90c6156aa8272ec9811647d9b6c87d7ee4326e35.tar.gz
CMake-90c6156aa8272ec9811647d9b6c87d7ee4326e35.tar.bz2
XLClang: Add a new compiler ID for the clang-based XL compiler
Diffstat (limited to 'Modules/Compiler/XLClang-C-DetermineCompiler.cmake')
-rw-r--r--Modules/Compiler/XLClang-C-DetermineCompiler.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/XLClang-C-DetermineCompiler.cmake b/Modules/Compiler/XLClang-C-DetermineCompiler.cmake
new file mode 100644
index 0000000..4d89921
--- /dev/null
+++ b/Modules/Compiler/XLClang-C-DetermineCompiler.cmake
@@ -0,0 +1,8 @@
+set(_compiler_id_pp_test "defined(__ibmxl__) && defined(__clang__)")
+
+set(_compiler_id_version_compute "
+# 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__)
+")