Make the type used for the "hidden" string length argument configurable (adapted from Reference-LAPACK PR 1025)tags/v0.3.28^2
| @@ -22,6 +22,8 @@ option(BUILD_WITHOUT_LAPACK "Do not build LAPACK and LAPACKE (Only BLAS or CBLAS | |||||
| option(BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON) | option(BUILD_LAPACK_DEPRECATED "When building LAPACK, include also some older, deprecated routines" ON) | ||||
| set(LAPACK_STRLEN "" CACHE STRING "When building LAPACK, use this type (e.g. \"int\") for character lengths (defaults to size_t)") | |||||
| option(BUILD_TESTING "Build LAPACK testsuite when building LAPACK" ON) | option(BUILD_TESTING "Build LAPACK testsuite when building LAPACK" ON) | ||||
| option(BUILD_BENCHMARKS "Build the collection of BLAS/LAPACK benchmarks" OFF) | option(BUILD_BENCHMARKS "Build the collection of BLAS/LAPACK benchmarks" OFF) | ||||
| @@ -45,6 +45,10 @@ else | |||||
| LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast -O -Og -Os,$(LAPACK_FFLAGS)) | LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast -O -Og -Os,$(LAPACK_FFLAGS)) | ||||
| endif | endif | ||||
| ifdef LAPACK_STRLEN | |||||
| LAPACK_FFLAGS += -DLAPACK_STRLEN=$(LAPACK_STRLEN) | |||||
| endif | |||||
| SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test | SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test | ||||
| .PHONY : all libs netlib $(RELA) test ctest shared install | .PHONY : all libs netlib $(RELA) test ctest shared install | ||||
| @@ -134,6 +134,12 @@ VERSION = 0.3.27.dev | |||||
| # Build LAPACK Deprecated functions since LAPACK 3.6.0 | # Build LAPACK Deprecated functions since LAPACK 3.6.0 | ||||
| BUILD_LAPACK_DEPRECATED = 1 | BUILD_LAPACK_DEPRECATED = 1 | ||||
| # The variable type assumed for the length of character arguments when passing | |||||
| # data between Fortran LAPACK and C BLAS (defaults to "size_t", but older GCC | |||||
| # versions used "int"). Mismatches will not cause runtime failures but may result | |||||
| # in build warnings or errors when building with link-time optimization (LTO) | |||||
| # LAPACK_STRLEN=int | |||||
| # Build RecursiveLAPACK on top of LAPACK | # Build RecursiveLAPACK on top of LAPACK | ||||
| # BUILD_RELAPACK = 1 | # BUILD_RELAPACK = 1 | ||||
| # Have RecursiveLAPACK actually replace standard LAPACK routines instead of | # Have RecursiveLAPACK actually replace standard LAPACK routines instead of | ||||
| @@ -621,7 +621,10 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FCOMMON_OPT}") | |||||
| set(FPFLAGS "${FPFLAGS} ${FCOMMON_OPT} ${COMMON_PROF}") | set(FPFLAGS "${FPFLAGS} ${FCOMMON_OPT} ${COMMON_PROF}") | ||||
| #For LAPACK Fortran codes. | #For LAPACK Fortran codes. | ||||
| set(LAPACK_FFLAGS "${LAPACK_FFLAGS} ${CMAKE_Fortran_FLAGS}") | |||||
| set(LAPACK_FFLAGS "${LAPACK_FFLAGS} ${CMAKE_Fortran_FLAGS}" ) | |||||
| if (LAPACK_STRLEN) | |||||
| set (LAPACK_FFLAGS "${LAPACK_FFLAGS} -DLAPACK_STRLEN=${LAPACK_STRLEN}") | |||||
| endif() | |||||
| set(LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS}") | set(LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS}") | ||||
| #Disable -fopenmp for LAPACK Fortran codes on Windows. | #Disable -fopenmp for LAPACK Fortran codes on Windows. | ||||