CMake: check IPO supported for Fortran as well

This commit is contained in:
xoviat 2018-01-30 14:49:57 -06:00 committed by GitHub
parent 2b84c3ecbc
commit 2d107cd396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@
## ##
cmake_minimum_required(VERSION 2.8.5) cmake_minimum_required(VERSION 2.8.5)
project(OpenBLAS C ASM) project(OpenBLAS C ASM)
set(OpenBLAS_MAJOR_VERSION 0) set(OpenBLAS_MAJOR_VERSION 0)
set(OpenBLAS_MINOR_VERSION 3) set(OpenBLAS_MINOR_VERSION 3)
@ -151,7 +150,7 @@ add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${RELA_SOURCES}
if(POLICY CMP0990) if(POLICY CMP0990)
cmake_policy(SET CMP0990 NEW) cmake_policy(SET CMP0990 NEW)
include(CheckIPOSupported) include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_SUPPORTED) check_ipo_supported(RESULT IPO_SUPPORTED LANGUAGES C Fortran)
if(IPO_SUPPORTED) if(IPO_SUPPORTED)
message(STATUS "Building with link-time code generation") message(STATUS "Building with link-time code generation")
set_property(TARGET ${OpenBLAS_LIBNAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) set_property(TARGET ${OpenBLAS_LIBNAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)