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
22
22
23
23
option (BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON )
24
24
25
+ set (LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \" int\" ) for character lengths (defaults to size_t)" )
26
+
25
27
option (BUILD_TESTING "Build LAPACK testsuite when building LAPACK" ON )
26
28
27
29
option (BUILD_BENCHMARKS "Build the collection of BLAS/LAPACK benchmarks" OFF )
Original file line number Diff line number Diff line change 45
45
LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast -O -Og -Os,$(LAPACK_FFLAGS ) )
46
46
endif
47
47
48
+ ifdef LAPACK_STRLEN
49
+ LAPACK_FFLAGS += -DLAPACK_STRLEN=$(LAPACK_STRLEN )
50
+ endif
51
+
48
52
SUBDIRS_ALL = $(SUBDIRS ) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test
49
53
50
54
.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
134
134
# Build LAPACK Deprecated functions since LAPACK 3.6.0
135
135
BUILD_LAPACK_DEPRECATED = 1
136
136
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
+
137
143
# Build RecursiveLAPACK on top of LAPACK
138
144
# BUILD_RELAPACK = 1
139
145
# 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}")
621
621
set (FPFLAGS "${FPFLAGS} ${FCOMMON_OPT} ${COMMON_PROF} " )
622
622
623
623
#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 ()
625
628
set (LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS} " )
626
629
627
630
#Disable -fopenmp for LAPACK Fortran codes on Windows.
You can’t perform that action at this time.
0 commit comments