Merge pull request #1327 from martin-frbg/cmake-relapack
Make ReLAPACK available in cmake builds
This commit is contained in:
commit
b7cee00455
|
@ -24,6 +24,7 @@ option(BUILD_WITHOUT_LAPACK "Without LAPACK and LAPACKE (Only BLAS or CBLAS)" ON
|
||||||
endif()
|
endif()
|
||||||
option(BUILD_WITHOUT_CBLAS "Without CBLAS" OFF)
|
option(BUILD_WITHOUT_CBLAS "Without CBLAS" OFF)
|
||||||
option(DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF)
|
option(DYNAMIC_ARCH "Build with DYNAMIC_ARCH" OFF)
|
||||||
|
option(BUILD_RELAPACK "Build with ReLAPACK (recursive LAPACK" OFF)
|
||||||
#######
|
#######
|
||||||
if(BUILD_WITHOUT_LAPACK)
|
if(BUILD_WITHOUT_LAPACK)
|
||||||
set(NO_LAPACK 1)
|
set(NO_LAPACK 1)
|
||||||
|
@ -55,6 +56,9 @@ endif ()
|
||||||
set(SUBDIRS ${BLASDIRS})
|
set(SUBDIRS ${BLASDIRS})
|
||||||
if (NOT NO_LAPACK)
|
if (NOT NO_LAPACK)
|
||||||
list(APPEND SUBDIRS lapack)
|
list(APPEND SUBDIRS lapack)
|
||||||
|
if(BUILD_RELAPACK)
|
||||||
|
list(APPEND SUBDIRS relapack/src)
|
||||||
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# set which float types we want to build for
|
# set which float types we want to build for
|
||||||
|
@ -141,7 +145,7 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
# add objects to the openblas lib
|
# add objects to the openblas lib
|
||||||
add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
|
add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${RELA_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
|
||||||
|
|
||||||
# Handle MSVC exports
|
# Handle MSVC exports
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(MSVC AND BUILD_SHARED_LIBS)
|
||||||
|
|
|
@ -387,6 +387,9 @@ if (NOT NO_LAPACK)
|
||||||
if (NOT NO_LAPACKE)
|
if (NOT NO_LAPACKE)
|
||||||
set(LIB_COMPONENTS "${LIB_COMPONENTS} LAPACKE")
|
set(LIB_COMPONENTS "${LIB_COMPONENTS} LAPACKE")
|
||||||
endif ()
|
endif ()
|
||||||
|
if (BUILD_RELAPACK)
|
||||||
|
set(LIB_COMPONENTS "${LIB_COMPONENTS} ReLAPACK")
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (ONLY_CBLAS)
|
if (ONLY_CBLAS)
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
include_directories(${PROJECT_SOURCE_DIR})
|
||||||
|
include_directories(${PROJECT_BINARY_DIR})
|
||||||
|
|
||||||
|
set(RELAFILES
|
||||||
|
clauum.c
|
||||||
|
ctrsyl_rec2.c
|
||||||
|
dsytrf.c
|
||||||
|
spbtrf.c
|
||||||
|
strsyl_rec2.c
|
||||||
|
zhetrf_rook_rec2.c
|
||||||
|
ztrsyl.c
|
||||||
|
cgbtrf.c
|
||||||
|
cpbtrf.c
|
||||||
|
ctrtri.c
|
||||||
|
dsytrf_rec2.c
|
||||||
|
spotrf.c
|
||||||
|
strtri.c
|
||||||
|
zlauum.c
|
||||||
|
ztrsyl_rec2.c
|
||||||
|
cgemmt.c
|
||||||
|
cpotrf.c
|
||||||
|
dgbtrf.c
|
||||||
|
dsytrf_rook.c
|
||||||
|
lapack_wrappers.c
|
||||||
|
ssygst.c
|
||||||
|
zgbtrf.c
|
||||||
|
zpbtrf.c
|
||||||
|
ztrtri.c
|
||||||
|
cgetrf.c
|
||||||
|
csytrf.c
|
||||||
|
dgemmt.c
|
||||||
|
dsytrf_rook_rec2.c
|
||||||
|
ssytrf.c
|
||||||
|
zgemmt.c
|
||||||
|
zpotrf.c
|
||||||
|
chegst.c
|
||||||
|
csytrf_rec2.c
|
||||||
|
dgetrf.c
|
||||||
|
dtgsyl.c
|
||||||
|
ssytrf_rec2.c
|
||||||
|
zgetrf.c
|
||||||
|
zsytrf.c
|
||||||
|
chetrf.c
|
||||||
|
csytrf_rook.c
|
||||||
|
dlauum.c
|
||||||
|
dtrsyl.c
|
||||||
|
sgbtrf.c
|
||||||
|
ssytrf_rook.c
|
||||||
|
zhegst.c
|
||||||
|
zsytrf_rec2.c
|
||||||
|
chetrf_rec2.c
|
||||||
|
csytrf_rook_rec2.c
|
||||||
|
dpbtrf.c
|
||||||
|
dtrsyl_rec2.c
|
||||||
|
sgemmt.c
|
||||||
|
ssytrf_rook_rec2.c
|
||||||
|
zhetrf.c
|
||||||
|
zsytrf_rook.c
|
||||||
|
chetrf_rook.c
|
||||||
|
ctgsyl.c
|
||||||
|
dpotrf.c
|
||||||
|
dtrtri.c
|
||||||
|
sgetrf.c
|
||||||
|
stgsyl.c
|
||||||
|
zhetrf_rec2.c
|
||||||
|
zsytrf_rook_rec2.c
|
||||||
|
chetrf_rook_rec2.c
|
||||||
|
ctrsyl.c
|
||||||
|
dsygst.c
|
||||||
|
f2c.c
|
||||||
|
slauum.c
|
||||||
|
strsyl.c
|
||||||
|
zhetrf_rook.c
|
||||||
|
ztgsyl.c
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# add relapack folder to the sources
|
||||||
|
set(RELA_SOURCES "")
|
||||||
|
foreach (RELA_FILE ${RELAFILES})
|
||||||
|
list(APPEND RELA_SOURCES "${PROJECT_SOURCE_DIR}/relapack/src/${RELA_FILE}")
|
||||||
|
endforeach ()
|
||||||
|
add_library(relapack_src OBJECT ${RELA_SOURCES})
|
||||||
|
set_source_files_properties(${RELA_SOURCES} PROPERTIES COMPILE_FLAGS "${LAPACK_CFLAGS}")
|
Loading…
Reference in New Issue