summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-30 11:31:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-06-30 11:31:39 (GMT)
commitd4a0d59472364aeb86ae673e00dd5d808cf0cade (patch)
tree8db8b66001eccb0bb6dbcaa36f59ac875dc45874 /Modules/Compiler
parentff52df1d5c713059503f195b8110e6f70f5355a6 (diff)
parent6ce97c2248ca62f7154f6b3eb44119b2a010aa87 (diff)
downloadCMake-d4a0d59472364aeb86ae673e00dd5d808cf0cade.zip
CMake-d4a0d59472364aeb86ae673e00dd5d808cf0cade.tar.gz
CMake-d4a0d59472364aeb86ae673e00dd5d808cf0cade.tar.bz2
Merge topic 'fujitsu-clang-findbinutils'
6ce97c2248 FujitsuClang: Change LTO option from -flto=thin to -flto 3a0effcd16 FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6281
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Clang.cmake3
-rw-r--r--Modules/Compiler/FujitsuClang-FindBinUtils.cmake6
2 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index 7035d93..f885eb0 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -56,6 +56,7 @@ else()
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
string(COMPARE EQUAL "${CMAKE_${lang}_COMPILER_ID}" "AppleClang" __is_apple_clang)
+ string(COMPARE EQUAL "${CMAKE_${lang}_COMPILER_ID}" "FujitsuClang" __is_fujitsu_clang)
# '-flto=thin' available since Clang 3.9 and Xcode 8
# * http://clang.llvm.org/docs/ThinLTO.html#clang-llvm
@@ -65,6 +66,8 @@ else()
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 8.0)
set(_CMAKE_LTO_THIN FALSE)
endif()
+ elseif(__is_fujitsu_clang)
+ set(_CMAKE_LTO_THIN FALSE)
else()
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.9)
set(_CMAKE_LTO_THIN FALSE)
diff --git a/Modules/Compiler/FujitsuClang-FindBinUtils.cmake b/Modules/Compiler/FujitsuClang-FindBinUtils.cmake
new file mode 100644
index 0000000..4a6401d
--- /dev/null
+++ b/Modules/Compiler/FujitsuClang-FindBinUtils.cmake
@@ -0,0 +1,6 @@
+if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
+ message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
+endif()
+
+set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR ar)
+set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB ranlib)