diff options
author | Brad King <brad.king@kitware.com> | 2021-06-25 11:23:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-06-25 11:23:58 (GMT) |
commit | fff5994e99dc83c616b2828f9b2f4fe84d27ad19 (patch) | |
tree | 37aa888d288ca3caf6860dd2266ee79a9423d145 /Modules | |
parent | 647e33d53e2a5ac362096b97408ad86cc8cce609 (diff) | |
parent | 96e362fdc9c6b138461919c96ef5e5a712dad8fb (diff) | |
download | CMake-fff5994e99dc83c616b2828f9b2f4fe84d27ad19.zip CMake-fff5994e99dc83c616b2828f9b2f4fe84d27ad19.tar.gz CMake-fff5994e99dc83c616b2828f9b2f4fe84d27ad19.tar.bz2 |
Merge topic 'fujitsu-ipo' into release-3.21
96e362fdc9 Fujitsu: Add IPO support for Fortran
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6261
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/Fujitsu.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/Compiler/Fujitsu.cmake b/Modules/Compiler/Fujitsu.cmake index 13bc57c..78495cb 100644 --- a/Modules/Compiler/Fujitsu.cmake +++ b/Modules/Compiler/Fujitsu.cmake @@ -26,6 +26,16 @@ macro(__compiler_fujitsu lang) set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,") set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",") + # IPO flag + set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES) + if ("${lang}" STREQUAL "Fortran") + # Supported by Fortran compiler only + set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) + set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-Klto") + else() + set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) + endif() + # How to actually call the compiler set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E $<$<COMPILE_LANGUAGE:Fortran>:-Cpp> <SOURCE> > <PREPROCESSED_SOURCE>") |