File tree Expand file tree Collapse file tree 5 files changed +1051
-1032
lines changed
lapack-netlib/LAPACKE/include Expand file tree Collapse file tree 5 files changed +1051
-1032
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ option(BUILD_WITHOUT_LAPACK "Do not build LAPACK and LAPACKE (Only BLAS or CBLAS
2222
2323option (BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON )
2424
25+ set (LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \" int\" ) for character lengths (defaults to size_t)" )
26+
2527option (BUILD_TESTING "Build LAPACK testsuite when building LAPACK" ON )
2628
2729option (BUILD_BENCHMARKS "Build the collection of BLAS/LAPACK benchmarks" OFF )
Original file line number Diff line number Diff line change 4545LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast -O -Og -Os,$(LAPACK_FFLAGS ) )
4646endif
4747
48+ ifdef LAPACK_STRLEN
49+ LAPACK_FFLAGS += -DLAPACK_STRLEN=$(LAPACK_STRLEN )
50+ endif
51+
4852SUBDIRS_ALL = $(SUBDIRS ) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test
4953
5054.PHONY : all libs netlib $(RELA ) test ctest shared install
Original file line number Diff line number Diff line change @@ -134,6 +134,12 @@ VERSION = 0.3.27.dev
134134# Build LAPACK Deprecated functions since LAPACK 3.6.0
135135BUILD_LAPACK_DEPRECATED = 1
136136
137+ # The variable type assumed for the length of character arguments when passing
138+ # data between Fortran LAPACK and C BLAS (defaults to "size_t", but older GCC
139+ # versions used "int"). Mismatches will not cause runtime failures but may result
140+ # in build warnings or errors when building with link-time optimization (LTO)
141+ # LAPACK_STRLEN=int
142+
137143# Build RecursiveLAPACK on top of LAPACK
138144# BUILD_RELAPACK = 1
139145# Have RecursiveLAPACK actually replace standard LAPACK routines instead of
Original file line number Diff line number Diff line change @@ -621,7 +621,10 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FCOMMON_OPT}")
621621set (FPFLAGS "${FPFLAGS} ${FCOMMON_OPT} ${COMMON_PROF} " )
622622
623623#For LAPACK Fortran codes.
624- set (LAPACK_FFLAGS "${LAPACK_FFLAGS} ${CMAKE_Fortran_FLAGS} " )
624+ set (LAPACK_FFLAGS "${LAPACK_FFLAGS} ${CMAKE_Fortran_FLAGS} " )
625+ if (LAPACK_STRLEN)
626+ set (LAPACK_FFLAGS "${LAPACK_FFLAGS} -DLAPACK_STRLEN=${LAPACK_STRLEN} " )
627+ endif ()
625628set (LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS} " )
626629
627630#Disable -fopenmp for LAPACK Fortran codes on Windows.
You can’t perform that action at this time.
0 commit comments