diff options
author | Brad King <brad.king@kitware.com> | 2021-06-30 11:31:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-06-30 11:31:39 (GMT) |
commit | da79d6bdf65baec60d8d2899af747285fd745e3e (patch) | |
tree | e22d7de7aeb39f27213118a76692f43fc6e5a41c | |
parent | 2e7ce62b73b871b2f01a24366b5e2952536aa6f0 (diff) | |
parent | 6ce97c2248ca62f7154f6b3eb44119b2a010aa87 (diff) | |
download | CMake-da79d6bdf65baec60d8d2899af747285fd745e3e.zip CMake-da79d6bdf65baec60d8d2899af747285fd745e3e.tar.gz CMake-da79d6bdf65baec60d8d2899af747285fd745e3e.tar.bz2 |
Merge topic 'fujitsu-clang-findbinutils' into release-3.21
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
-rw-r--r-- | Modules/Compiler/Clang.cmake | 3 | ||||
-rw-r--r-- | Modules/Compiler/FujitsuClang-FindBinUtils.cmake | 6 |
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) |