summaryrefslogtreecommitdiff
path: root/BLAS
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2009-08-11 21:58:21 +0000
committerjulie <julielangou@users.noreply.github.com>2009-08-11 21:58:21 +0000
commit17112c1f29d9f7a7ff72de549c70845f40a37145 (patch)
treeb96e520fccdb87b13abb706a97561d11a3570b94 /BLAS
parent8a4a5ccc1ecec7966779696e79d492a604521870 (diff)
downloadlapack-17112c1f29d9f7a7ff72de549c70845f40a37145.tar.gz
lapack-17112c1f29d9f7a7ff72de549c70845f40a37145.tar.bz2
lapack-17112c1f29d9f7a7ff72de549c70845f40a37145.zip
Add CMAKE support to LAPACK
Diffstat (limited to 'BLAS')
-rw-r--r--BLAS/CMakeLists.txt2
-rw-r--r--BLAS/SRC/CMakeLists.txt143
-rw-r--r--BLAS/TESTING/CMakeLists.txt63
3 files changed, 208 insertions, 0 deletions
diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt
new file mode 100644
index 00000000..05b8ff97
--- /dev/null
+++ b/BLAS/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(SRC)
+add_subdirectory(TESTING) \ No newline at end of file
diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt
new file mode 100644
index 00000000..cb28fa49
--- /dev/null
+++ b/BLAS/SRC/CMakeLists.txt
@@ -0,0 +1,143 @@
+#######################################################################
+# This is the makefile to create a library for the BLAS.
+# The files are grouped as follows:
+#
+# SBLAS1 -- Single precision real BLAS routines
+# CBLAS1 -- Single precision complex BLAS routines
+# DBLAS1 -- Double precision real BLAS routines
+# ZBLAS1 -- Double precision complex BLAS routines
+#
+# CB1AUX -- Real BLAS routines called by complex routines
+# ZB1AUX -- D.P. real BLAS routines called by d.p. complex
+# routines
+#
+# ALLBLAS -- Auxiliary routines for Level 2 and 3 BLAS
+#
+# SBLAS2 -- Single precision real BLAS2 routines
+# CBLAS2 -- Single precision complex BLAS2 routines
+# DBLAS2 -- Double precision real BLAS2 routines
+# ZBLAS2 -- Double precision complex BLAS2 routines
+#
+# SBLAS3 -- Single precision real BLAS3 routines
+# CBLAS3 -- Single precision complex BLAS3 routines
+# DBLAS3 -- Double precision real BLAS3 routines
+# ZBLAS3 -- Double precision complex BLAS3 routines
+#
+# The library can be set up to include routines for any combination
+# of the four precisions. To create or add to the library, enter make
+# followed by one or more of the precisions desired. Some examples:
+# make single
+# make single complex
+# make single double complex complex16
+# Note that these commands are not safe for parallel builds.
+#
+# Alternatively, the commands
+# make all
+# or
+# make
+# without any arguments creates a library of all four precisions.
+# The name of the library is held in BLASLIB, which is set in the
+# top-level make.inc
+#
+# To remove the object files after the library is created, enter
+# make clean
+# To force the source files to be recompiled, enter, for example,
+# make single FRC=FRC
+#
+#---------------------------------------------------------------------
+#
+# Edward Anderson, University of Tennessee
+# March 26, 1990
+# Susan Ostrouchov, Last updated September 30, 1994
+# ejr, May 2006.
+#
+#######################################################################
+
+#---------------------------------------------------------
+# Comment out the next 6 definitions if you already have
+# the Level 1 BLAS.
+#---------------------------------------------------------
+set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f
+ srot.f srotg.f sscal.f sswap.f sdsdot.f srotmg.f srotm.f)
+
+set(CBLAS1 scabs1.f scasum.f scnrm2.f icamax.f caxpy.f ccopy.f
+ cdotc.f cdotu.f csscal.f crotg.f cscal.f cswap.f csrot.f)
+
+set(DBLAS1 idamax.f dasum.f daxpy.f dcopy.f ddot.f dnrm2.f
+ drot.f drotg.f dscal.f dsdot.f dswap.f drotmg.f drotm.f)
+
+set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f izamax.f zaxpy.f zcopy.f
+ zdotc.f zdotu.f zdscal.f zrotg.f zscal.f zswap.f zdrot.f)
+
+set(CB1AUX isamax.f sasum.f saxpy.f scopy.f snrm2.f sscal.f)
+
+set(ZB1AUX idamax.f dasum.f daxpy.f dcopy.f dnrm2.f dscal.f)
+
+#---------------------------------------------------------------------
+# The following line defines auxiliary routines needed by both the
+# Level 2 and Level 3 BLAS. Comment it out only if you already have
+# both the Level 2 and 3 BLAS.
+#---------------------------------------------------------------------
+set(ALLBLAS lsame.f ) #xerbla.f xerbla_array.f)
+
+#---------------------------------------------------------
+# Comment out the next 4 definitions if you already have
+# the Level 2 BLAS.
+#---------------------------------------------------------
+set(SBLAS2 sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f
+ strmv.f stbmv.f stpmv.f strsv.f stbsv.f stpsv.f
+ sger.f ssyr.f sspr.f ssyr2.f sspr2.f)
+
+set(CBLAS2 cgemv.f cgbmv.f chemv.f chbmv.f chpmv.f
+ ctrmv.f ctbmv.f ctpmv.f ctrsv.f ctbsv.f ctpsv.f
+ cgerc.f cgeru.f cher.f chpr.f cher2.f chpr2.f)
+
+set(DBLAS2 dgemv.f dgbmv.f dsymv.f dsbmv.f dspmv.f
+ dtrmv.f dtbmv.f dtpmv.f dtrsv.f dtbsv.f dtpsv.f
+ dger.f dsyr.f dspr.f dsyr2.f dspr2.f)
+
+set(ZBLAS2 zgemv.f zgbmv.f zhemv.f zhbmv.f zhpmv.f
+ ztrmv.f ztbmv.f ztpmv.f ztrsv.f ztbsv.f ztpsv.f
+ zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f)
+
+#---------------------------------------------------------
+# Comment out the next 4 definitions if you already have
+# the Level 3 BLAS.
+#---------------------------------------------------------
+set(SBLAS3 sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f )
+
+set(CBLAS3 cgemm.f csymm.f csyrk.f csyr2k.f ctrmm.f ctrsm.f
+ chemm.f cherk.f cher2k.f)
+
+set(DBLAS3 dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f)
+
+set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f
+ zhemm.f zherk.f zher2k.f)
+# default build all of it
+set(ALLOBJ ${SBLAS1} ${SBLAS2} ${SBLAS3} ${DBLAS1} ${DBLAS2} ${DBLAS3}
+ ${CBLAS1} ${CBLAS2} ${CBLAS3} ${ZBLAS1}
+ ${ZBLAS2} ${ZBLAS3} ${ALLBLAS})
+
+if(BLAS_SINGLE)
+ set(ALLOBJ ${SBLAS1} ${ALLBLAS}
+ ${SBLAS2} ${SBLAS3})
+endif()
+if(BLAS_DOUBLE)
+ set(ALLOBJ ${DBLAS1} ${ALLBLAS}
+ ${DBLAS2} ${DBLAS3})
+endif()
+if(BLAS_COMPLEX)
+ set(ALLOBJ ${BLASLIB} ${CBLAS1} ${CB1AUX}
+ ${ALLBLAS} ${CBLAS2})
+endif()
+if(BLAS_COMPLEX16)
+ set(ALLOBJ ${BLASLIB} ${ZBLAS1} ${ZB1AUX}
+ ${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
+endif()
+
+
+add_library(blas ${ALLOBJ})
+if(UNIX)
+ target_link_libraries(blas m)
+endif()
+target_link_libraries(blas)
diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt
new file mode 100644
index 00000000..9e81501a
--- /dev/null
+++ b/BLAS/TESTING/CMakeLists.txt
@@ -0,0 +1,63 @@
+#######################################################################
+# This makefile creates the test programs for the BLAS 1 routines.
+# The test files are grouped as follows:
+# SBLAT1 -- Single precision real test routines
+# CBLAT1 -- Single precision complex test routines
+# DBLAT1 -- Double precision real test routines
+# ZBLAT1 -- Double precision complex test routines
+#
+# Test programs can be generated for all or some of the four different
+# precisions. To create the test programs, enter make followed by one
+# or more of the precisions desired. Some examples:
+# make single
+# make single complex
+# make single double complex complex16
+# Alternatively, the command
+# make
+# without any arguments creates all four test programs.
+# The executable files which are created are called
+# ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z
+#
+# To remove the object files after the executable files have been
+# created, enter
+# make clean
+# To force the source files to be recompiled, enter, for example,
+# make single FRC=FRC
+#
+#######################################################################
+
+macro(add_blas_test name src)
+ get_filename_component(baseNAME ${src} NAME_WE)
+ set(TEST_INPUT "${LAPACK_SOURCE_DIR}/BLAS/${baseNAME}.in")
+ add_executable(${name} ${src})
+ get_target_property(TEST_LOC ${name} LOCATION)
+ target_link_libraries(${name} blas)
+ if(EXISTS "${TEST_INPUT}")
+ add_test(${name} "${CMAKE_COMMAND}"
+ -DTEST=${TEST_LOC}
+ -DINPUT=${TEST_INPUT}
+ -DINTDIR=${CMAKE_CFG_INTDIR}
+ -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
+ else()
+ add_test(${name} "${CMAKE_COMMAND}"
+ -DTEST=${TEST_LOC}
+ -DINTDIR=${CMAKE_CFG_INTDIR}
+ -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
+ endif()
+endmacro(add_blas_test)
+
+add_blas_test(xblat1s sblat1.f)
+add_blas_test(xblat1c cblat1.f)
+add_blas_test(xblat1d dblat1.f)
+add_blas_test(xblat1z zblat1.f)
+
+add_blas_test(xblat2s sblat2.f sblat2.in)
+add_blas_test(xblat2c cblat2.f )
+add_blas_test(xblat2d dblat2.f)
+add_blas_test(xblat2z zblat2.f)
+
+add_blas_test(xblat3s sblat3.f)
+add_blas_test(xblat3c cblat3.f)
+add_blas_test(xblat3d dblat3.f)
+add_blas_test(xblat3z zblat3.f)
+