summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/XLClang.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.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.cmake')
-rw-r--r--Modules/Compiler/XLClang.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/Modules/Compiler/XLClang.cmake b/Modules/Compiler/XLClang.cmake
new file mode 100644
index 0000000..cdf0fdc
--- /dev/null
+++ b/Modules/Compiler/XLClang.cmake
@@ -0,0 +1,22 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__COMPILER_XLCLANG)
+ return()
+endif()
+set(__COMPILER_XLCLANG 1)
+
+include(Compiler/XL)
+
+macro(__compiler_xlclang lang)
+ __compiler_xl(${lang})
+
+ # Feature flags.
+ set(CMAKE_${lang}_VERBOSE_FLAG "-V")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIC")
+ set(CMAKE_${lang}_RESPONSE_FILE_FLAG "@")
+ set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@")
+endmacro()