summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt45
-rw-r--r--SRC/CMakeLists.txt20
-rw-r--r--SRC/Makefile26
3 files changed, 71 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3189f26c..d733b506 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,10 +5,20 @@ if (UNIX)
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" )
endif ()
endif ()
+
+# --------------------------------------------------
+# Testing
+
enable_testing()
include(CTest)
enable_testing()
+# --------------------------------------------------
+
set(CMAKE_MODULE_PATH ${LAPACK_SOURCE_DIR} ${CMAKE_MODULE_PATH})
+
+# --------------------------------------------------
+# Check second function
+
include(CheckTimeFunction)
set(TIME_FUNC NONE ${TIME_FUNC})
CHECK_TIME_FUNCTION(NONE TIME_FUNC)
@@ -21,15 +31,48 @@ message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as
set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
+# --------------------------------------------------
+# Subdirectories that need to be processed
+
add_subdirectory(BLAS)
add_subdirectory(SRC)
add_subdirectory(TESTING)
+# --------------------------------------------------
+# CPACK Packaging
+
+SET(CPACK_PACKAGE_NAME "LAPACK")
+SET(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LAPACK- Linear Algebra Package")
set(LAPACK_VERSION 3.2.2)
set(CPACK_PACKAGE_VERSION_MAJOR 3)
set(CPACK_PACKAGE_VERSION_MINOR 2)
set(CPACK_PACKAGE_VERSION_PATCH 2)
-include(CPack)
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LAPACK")
+IF(WIN32 AND NOT UNIX)
+ # There is a bug in NSI that does not handle full unix paths properly. Make
+ # sure there is at least one set of four (4) backlasshes.
+ SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\http://icl.cs.utk.edu/lapack-forum")
+ SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.netlib.org/lapack")
+ SET(CPACK_NSIS_CONTACT "lapack@eecs.utk.edu")
+ SET(CPACK_NSIS_MODIFY_PATH ON)
+ SET(CPACK_NSIS_DISPLAY_NAME "LAPACK-${LAPACK_VERSION}")
+ set(CPACK_PACKAGE_RELOCATABLE "true")
+ELSE(WIN32 AND NOT UNIX)
+ SET(CPACK_GENERATOR "TGZ")
+ SET(CPACK_SOURCE_GENERATOR TGZ)
+ SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lapack-${LAPACK_VERSION}" )
+ SET(CPACK_SOURCE_IGNORE_FILES ~$ .svn ${CPACK_SOURCE_IGNORE_FILES} )
+ENDIF(WIN32 AND NOT UNIX)
+INCLUDE(CPack)
+
+
+# --------------------------------------------------
+# By default static library
+OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF )
+#OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON )
+
export(TARGETS blas lapack FILE lapack-targets.cmake)
configure_file(${LAPACK_SOURCE_DIR}/lapack-config-version.cmake.in
${LAPACK_BINARY_DIR}/lapack-config-version.cmake @ONLY)
diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt
index 290c5d67..cc2c8748 100644
--- a/SRC/CMakeLists.txt
+++ b/SRC/CMakeLists.txt
@@ -48,7 +48,8 @@
set(ALLAUX ilaenv.f ieeeck.f lsamen.f iparmq.f
ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f
- ../INSTALL/ilaver.f ../INSTALL/lsame.f xerbla.f xerbla_array.f)
+ ../INSTALL/ilaver.f ../INSTALL/lsame.f xerbla.f xerbla_array.f
+ ../INSTALL/slamch.f)
set(ALLXAUX )
@@ -67,7 +68,7 @@ set(SCLAUX
slaset.f slasq1.f slasq2.f slasq3.f slasq4.f slasq5.f slasq6.f
slasr.f slasrt.f slassq.f slasv2.f spttrf.f sstebz.f sstedc.f
ssteqr.f ssterf.f slaisnan.f sisnan.f
- ../INSTALL/slamch.f ${SECOND_SRC})
+ ${SECOND_SRC})
set(DZLAUX
dbdsdc.f
@@ -140,6 +141,8 @@ set(SLASRC
sgejsv.f sgesvj.f sgsvj0.f sgsvj1.f
sgeequb.f ssyequb.f spoequb.f sgbequb.f)
+set(DSLASRC spotrs.f sgetrs.f spotrf.f sgetrf.f)
+
set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
sla_gercond.f sla_rpvgrw.f ssysvxx.f ssyrfsx.f
sla_syrfsx_extended.f sla_syamv.f sla_syrcond.f sla_syrpvgrw.f
@@ -218,6 +221,8 @@ set(CXLASRC cgesvxx.f cgerfsx.f cla_gerfsx_extended.f cla_geamv.f
cla_hercond_c.f cla_hercond_x.f cla_herpvgrw.f
cla_lin_berr.f clarscl2.f clascl2.f cla_wwaddw.f)
+set(ZCLASRC cpotrs.f cgetrs.f cpotrf.f cgetrf.f)
+
set(DLASRC
dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
dgbsvx.f dgbtf2.f dgbtrf.f dgbtrs.f dgebak.f dgebal.f dgebd2.f
@@ -360,20 +365,19 @@ if( USEXBLAS)
set(ALLXOBJ ${SXLASRC} ${DXLASRC} ${CXLASRC} ${ZXLASRC} ${ALLXAUX})
endif()
-set(ALLOBJ ${SLASRC} ${DLASRC} ${CLASRC} ${ZLASRC} ${SCLAUX} ${DZLAUX}
+set(ALLOBJ ${SLASRC} ${DSLASRC} ${DLASRC} ${CLASRC} ${ZCLASRC} ${ZLASRC} ${SCLAUX} ${DZLAUX}
${ALLAUX})
if(BUILD_SINGLE)
-set(ALLOBJ ${SLASRC} ${ALLAUX}
- ${SCLAUX})
+set(ALLOBJ ${SLASRC} ${ALLAUX} ${SCLAUX} ${DSLASRC} )
endif()
if(BUILD_DOUBLE)
- set(ALLOBJ ${DLASRC} ${ALLAUX} ${DZLAUX})
+ set(ALLOBJ ${DLASRC} ${ALLAUX} ${DZLAUX} ${DSLASRC})
endif()
if(BUILD_COMPLEX)
- set(ALLOBJ ${CLASRC} ${ALLAUX} ${SCLAUX})
+ set(ALLOBJ ${CLASRC} ${ALLAUX} ${SCLAUX} ${ZCLASRC} )
endif()
if(BUILD_COMPLEX16)
- set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX})
+ set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX} ${ZCLASRC})
endif()
add_library(lapack ${ALLOBJ} ${ALLXOBJ})
target_link_libraries(lapack blas)
diff --git a/SRC/Makefile b/SRC/Makefile
index 011cbd6e..2cf9323b 100644
--- a/SRC/Makefile
+++ b/SRC/Makefile
@@ -50,7 +50,7 @@ include ../make.inc
ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \
ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \
- ../INSTALL/ilaver.o ../INSTALL/lsame.o
+ ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o
ALLXAUX =
@@ -69,7 +69,7 @@ SCLAUX = \
slaset.o slasq1.o slasq2.o slasq3.o slasq4.o slasq5.o slasq6.o \
slasr.o slasrt.o slassq.o slasv2.o spttrf.o sstebz.o sstedc.o \
ssteqr.o ssterf.o slaisnan.o sisnan.o \
- ../INSTALL/slamch.o ../INSTALL/second_$(TIMER).o
+ ../INSTALL/second_$(TIMER).o
DZLAUX = \
dbdsdc.o \
@@ -96,8 +96,8 @@ SLASRC = \
sgels.o sgelsd.o sgelss.o sgelsx.o sgelsy.o sgeql2.o sgeqlf.o \
sgeqp3.o sgeqpf.o sgeqr2.o sgeqr2p.o sgeqrf.o sgeqrfp.o sgerfs.o \
sgerq2.o sgerqf.o sgesc2.o sgesdd.o sgesv.o sgesvd.o sgesvx.o \
- sgetc2.o sgetf2.o sgetrf.o sgetri.o \
- sgetrs.o sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \
+ sgetc2.o sgetf2.o sgetri.o \
+ sggbak.o sggbal.o sgges.o sggesx.o sggev.o sggevx.o \
sggglm.o sgghrd.o sgglse.o sggqrf.o \
sggrqf.o sggsvd.o sggsvp.o sgtcon.o sgtrfs.o sgtsv.o \
sgtsvx.o sgttrf.o sgttrs.o sgtts2.o shgeqz.o \
@@ -121,7 +121,7 @@ SLASRC = \
sormr3.o sormrq.o sormrz.o sormtr.o spbcon.o spbequ.o spbrfs.o \
spbstf.o spbsv.o spbsvx.o \
spbtf2.o spbtrf.o spbtrs.o spocon.o spoequ.o sporfs.o sposv.o \
- sposvx.o spotf2.o spotrf.o spotri.o spotrs.o spstrf.o spstf2.o \
+ sposvx.o spotf2.o spotrf.o spotri.o spstrf.o spstf2.o \
sppcon.o sppequ.o \
spprfs.o sppsv.o sppsvx.o spptrf.o spptri.o spptrs.o sptcon.o \
spteqr.o sptrfs.o sptsv.o sptsvx.o spttrs.o sptts2.o srscl.o \
@@ -142,6 +142,8 @@ SLASRC = \
sgejsv.o sgesvj.o sgsvj0.o sgsvj1.o \
sgeequb.o ssyequb.o spoequb.o sgbequb.o
+DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o
+
SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \
sla_gercond.o sla_rpvgrw.o ssysvxx.o ssyrfsx.o \
sla_syrfsx_extended.o sla_syamv.o sla_syrcond.o sla_syrpvgrw.o \
@@ -220,6 +222,8 @@ CXLASRC = cgesvxx.o cgerfsx.o cla_gerfsx_extended.o cla_geamv.o \
cla_hercond_c.o cla_hercond_x.o cla_herpvgrw.o \
cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o
+ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o
+
DLASRC = \
dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \
dgbsvx.o dgbtf2.o dgbtrf.o dgbtrs.o dgebak.o dgebal.o dgebd2.o \
@@ -363,8 +367,8 @@ ifdef USEXBLAS
ALLXOBJ=$(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) $(ALLXAUX)
endif
-ALLOBJ=$(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) \
- $(ALLAUX)
+ALLOBJ=$(SLASRC) $(DLASRC) $(DSLASRC) $(CLASRC) $(ZLASRC) $(ZCLASRC) \
+ $(SCLAUX) $(DZLAUX) $(ALLAUX)
../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ)
$(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ)
@@ -372,22 +376,22 @@ ALLOBJ=$(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) \
single: $(SLASRC) $(ALLAUX) $(SCLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \
- $(SCLAUX)
+ $(SCLAUX) $(DSLASRC)
$(RANLIB) ../$(LAPACKLIB)
complex: $(CLASRC) $(ALLAUX) $(SCLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(CLASRC) $(ALLAUX) \
- $(SCLAUX)
+ $(SCLAUX) $(ZCLASRC)
$(RANLIB) ../$(LAPACKLIB)
double: $(DLASRC) $(ALLAUX) $(DZLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(DLASRC) $(ALLAUX) \
- $(DZLAUX)
+ $(DZLAUX) $(DSLASRC)
$(RANLIB) ../$(LAPACKLIB)
complex16: $(ZLASRC) $(ALLAUX) $(DZLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(ZLASRC) $(ALLAUX) \
- $(DZLAUX)
+ $(DZLAUX) $(ZCLASRC)
$(RANLIB) ../$(LAPACKLIB)
$(ALLAUX): $(FRC)