Changed netlib-lapack to fix an error in the CMake setup. (#8172)

* Changed netlib-lapack to fix an error in their CMake setup. Changed
netlib-lapack spackage file to add Fortran flags correctly for XL
compiler.

* Fixed line length -- forgot abt flake8...

* Fix the package version where the ibm patch applies.
This commit is contained in:
Serban Maerean 2018-05-17 20:51:34 -04:00 committed by Adam J. Stewart
parent 9f12b5aed6
commit a020a41298
2 changed files with 21 additions and 6 deletions

View file

@ -1,6 +1,5 @@
diff -Naur lapack-3.6.1/CMAKE/CheckLAPACKCompilerFlags.cmake lapack-3.6.1-patched/CMAKE/CheckLAPACKCompilerFlags.cmake --- a/CMAKE/CheckLAPACKCompilerFlags.cmake
--- lapack-3.6.1/CMAKE/CheckLAPACKCompilerFlags.cmake 2017-01-27 17:14:37.414854283 -0500 +++ b/CMAKE/CheckLAPACKCompilerFlags.cmake
+++ lapack-3.6.1-patched/CMAKE/CheckLAPACKCompilerFlags.cmake 2017-01-27 17:14:24.754719546 -0500
@@ -43,12 +43,6 @@ @@ -43,12 +43,6 @@
if( "${CMAKE_Fortran_FLAGS}" MATCHES "-qflttrap=[a-zA-Z:]:enable" ) if( "${CMAKE_Fortran_FLAGS}" MATCHES "-qflttrap=[a-zA-Z:]:enable" )
set( FPE_EXIT TRUE ) set( FPE_EXIT TRUE )
@ -14,3 +13,18 @@ diff -Naur lapack-3.6.1/CMAKE/CheckLAPACKCompilerFlags.cmake lapack-3.6.1-patche
# HP Fortran # HP Fortran
elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "HP" ) elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "HP" )
--- a/CBLAS/CMakeLists.txt
+++ b/CBLAS/CMakeLists.txt
@@ -12,8 +12,8 @@
SYMBOL_NAMESPACE "F77_")
if(NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND)
message(WARNING "Reverting to pre-defined include/lapacke_mangling.h")
- configure_file(include/lapacke_mangling_with_flags.h.in
- ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h)
+ configure_file(include/cblas_mangling_with_flags.h.in
+ ${LAPACK_BINARY_DIR}/include/cblas_mangling.h)
endif()
include_directories(include ${LAPACK_BINARY_DIR}/include)

View file

@ -59,8 +59,8 @@ class NetlibLapack(Package):
variant('xblas', default=False, variant('xblas', default=False,
description='Builds extended precision routines using XBLAS') description='Builds extended precision routines using XBLAS')
patch('ibm-xl.patch', when='@3:6%xl') patch('ibm-xl.patch', when='@3.7: %xl')
patch('ibm-xl.patch', when='@3:6%xl_r') patch('ibm-xl.patch', when='@3.7: %xl_r')
# virtual dependency # virtual dependency
provides('blas', when='~external-blas') provides('blas', when='~external-blas')
@ -153,7 +153,8 @@ def install_one(self, spec, prefix, shared):
# use F77 compiler if IBM XL # use F77 compiler if IBM XL
cmake_args.extend([ cmake_args.extend([
'-DCMAKE_Fortran_COMPILER=%s' % self.compiler.f77, '-DCMAKE_Fortran_COMPILER=%s' % self.compiler.f77,
'-DCMAKE_Fortran_FLAGS=-qzerosize' '-DCMAKE_Fortran_FLAGS=%s' % (
' '.join(self.spec.compiler_flags['fflags'])),
]) ])
# deprecated routines are commonly needed by, for example, suitesparse # deprecated routines are commonly needed by, for example, suitesparse