summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Linux-Intel-Fortran.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-02 17:52:13 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-02 17:52:13 (GMT)
commitc513962701dd6fbab8113ae104deb0eaa76a16e1 (patch)
tree2dd039d951e1b24c2d8318b275c7033e22f9a851 /Modules/Platform/Linux-Intel-Fortran.cmake
parent1e482435912f44e05b5e67f19b1bc14ff58a3169 (diff)
downloadCMake-c513962701dd6fbab8113ae104deb0eaa76a16e1.zip
CMake-c513962701dd6fbab8113ae104deb0eaa76a16e1.tar.gz
CMake-c513962701dd6fbab8113ae104deb0eaa76a16e1.tar.bz2
Create INTERPROCEDURAL_OPTIMIZATION build feature
This commit creates target and directory properties to enable the Intel interprocedural optimization support on Linux. Enabling it adds the compiler option '-ipo' and uses 'xiar' to create archives. See issue #9615.
Diffstat (limited to 'Modules/Platform/Linux-Intel-Fortran.cmake')
-rw-r--r--Modules/Platform/Linux-Intel-Fortran.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Platform/Linux-Intel-Fortran.cmake b/Modules/Platform/Linux-Intel-Fortran.cmake
index 1db5ba6..27a98ed 100644
--- a/Modules/Platform/Linux-Intel-Fortran.cmake
+++ b/Modules/Platform/Linux-Intel-Fortran.cmake
@@ -1,6 +1,8 @@
INCLUDE(Platform/Linux-Intel)
IF(XIAR)
- SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY
+ # INTERPROCEDURAL_OPTIMIZATION
+ SET(CMAKE_Fortran_COMPILE_OPTIONS_IPO -ipo)
+ SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY_IPO
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} -s <TARGET> ")
ENDIF(XIAR)