summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorPaul Zehner <zehner.paul@jaxa.jp>2021-06-24 03:09:52 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-24 13:02:15 (GMT)
commit96e362fdc9c6b138461919c96ef5e5a712dad8fb (patch)
treecd3c5f03c91f56e370f6bd744aa43f504c06f902 /Modules
parent9a704fd37e42c4f68953ae87fea365a675b6c35d (diff)
downloadCMake-96e362fdc9c6b138461919c96ef5e5a712dad8fb.zip
CMake-96e362fdc9c6b138461919c96ef5e5a712dad8fb.tar.gz
CMake-96e362fdc9c6b138461919c96ef5e5a712dad8fb.tar.bz2
Fujitsu: Add IPO support for Fortran
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/Fujitsu.cmake10
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>")