You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 5.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #######################################################################
  2. # This is the makefile to create a library for the BLAS.
  3. # The files are grouped as follows:
  4. #
  5. # SBLAS1 -- Single precision real BLAS routines
  6. # CBLAS1 -- Single precision complex BLAS routines
  7. # DBLAS1 -- Double precision real BLAS routines
  8. # ZBLAS1 -- Double precision complex BLAS routines
  9. #
  10. # CB1AUX -- Real BLAS routines called by complex routines
  11. # ZB1AUX -- D.P. real BLAS routines called by d.p. complex
  12. # routines
  13. #
  14. # ALLBLAS -- Auxiliary routines for Level 2 and 3 BLAS
  15. #
  16. # SBLAS2 -- Single precision real BLAS2 routines
  17. # CBLAS2 -- Single precision complex BLAS2 routines
  18. # DBLAS2 -- Double precision real BLAS2 routines
  19. # ZBLAS2 -- Double precision complex BLAS2 routines
  20. #
  21. # SBLAS3 -- Single precision real BLAS3 routines
  22. # CBLAS3 -- Single precision complex BLAS3 routines
  23. # DBLAS3 -- Double precision real BLAS3 routines
  24. # ZBLAS3 -- Double precision complex BLAS3 routines
  25. #
  26. # The library can be set up to include routines for any combination
  27. # of the four precisions. To create or add to the library, enter make
  28. # followed by one or more of the precisions desired. Some examples:
  29. # make single
  30. # make single complex
  31. # make single double complex complex16
  32. # Note that these commands are not safe for parallel builds.
  33. #
  34. # Alternatively, the commands
  35. # make all
  36. # or
  37. # make
  38. # without any arguments creates a library of all four precisions.
  39. # The name of the library is held in BLASLIB, which is set in the
  40. # top-level make.inc
  41. #
  42. # To remove the object files after the library is created, enter
  43. # make clean
  44. # To force the source files to be recompiled, enter, for example,
  45. # make single FRC=FRC
  46. #
  47. #---------------------------------------------------------------------
  48. #
  49. # Edward Anderson, University of Tennessee
  50. # March 26, 1990
  51. # Susan Ostrouchov, Last updated September 30, 1994
  52. # ejr, May 2006.
  53. #
  54. #######################################################################
  55. #---------------------------------------------------------
  56. # Comment out the next 6 definitions if you already have
  57. # the Level 1 BLAS.
  58. #---------------------------------------------------------
  59. set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f
  60. srot.f srotg.f sscal.f sswap.f sdsdot.f srotmg.f srotm.f)
  61. set(CBLAS1 scabs1.f scasum.f scnrm2.f icamax.f caxpy.f ccopy.f
  62. cdotc.f cdotu.f csscal.f crotg.f cscal.f cswap.f csrot.f)
  63. set(DBLAS1 idamax.f dasum.f daxpy.f dcopy.f ddot.f dnrm2.f
  64. drot.f drotg.f dscal.f dsdot.f dswap.f drotmg.f drotm.f)
  65. set(ZBLAS1 dcabs1.f dzasum.f dznrm2.f izamax.f zaxpy.f zcopy.f
  66. zdotc.f zdotu.f zdscal.f zrotg.f zscal.f zswap.f zdrot.f)
  67. set(CB1AUX isamax.f sasum.f saxpy.f scopy.f snrm2.f sscal.f)
  68. set(ZB1AUX idamax.f dasum.f daxpy.f dcopy.f dnrm2.f dscal.f)
  69. #---------------------------------------------------------------------
  70. # The following line defines auxiliary routines needed by both the
  71. # Level 2 and Level 3 BLAS. Comment it out only if you already have
  72. # both the Level 2 and 3 BLAS.
  73. #---------------------------------------------------------------------
  74. set(ALLBLAS lsame.f xerbla.f xerbla_array.f)
  75. #---------------------------------------------------------
  76. # Comment out the next 4 definitions if you already have
  77. # the Level 2 BLAS.
  78. #---------------------------------------------------------
  79. set(SBLAS2 sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f
  80. strmv.f stbmv.f stpmv.f strsv.f stbsv.f stpsv.f
  81. sger.f ssyr.f sspr.f ssyr2.f sspr2.f)
  82. set(CBLAS2 cgemv.f cgbmv.f chemv.f chbmv.f chpmv.f
  83. ctrmv.f ctbmv.f ctpmv.f ctrsv.f ctbsv.f ctpsv.f
  84. cgerc.f cgeru.f cher.f chpr.f cher2.f chpr2.f)
  85. set(DBLAS2 dgemv.f dgbmv.f dsymv.f dsbmv.f dspmv.f
  86. dtrmv.f dtbmv.f dtpmv.f dtrsv.f dtbsv.f dtpsv.f
  87. dger.f dsyr.f dspr.f dsyr2.f dspr2.f)
  88. set(ZBLAS2 zgemv.f zgbmv.f zhemv.f zhbmv.f zhpmv.f
  89. ztrmv.f ztbmv.f ztpmv.f ztrsv.f ztbsv.f ztpsv.f
  90. zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f)
  91. #---------------------------------------------------------
  92. # Comment out the next 4 definitions if you already have
  93. # the Level 3 BLAS.
  94. #---------------------------------------------------------
  95. set(SBLAS3 sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f )
  96. set(CBLAS3 cgemm.f csymm.f csyrk.f csyr2k.f ctrmm.f ctrsm.f
  97. chemm.f cherk.f cher2k.f)
  98. set(DBLAS3 dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f)
  99. set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f
  100. zhemm.f zherk.f zher2k.f)
  101. # default build all of it
  102. set(ALLOBJ ${SBLAS1} ${SBLAS2} ${SBLAS3} ${DBLAS1} ${DBLAS2} ${DBLAS3}
  103. ${CBLAS1} ${CBLAS2} ${CBLAS3} ${ZBLAS1}
  104. ${ZBLAS2} ${ZBLAS3} ${ALLBLAS})
  105. if(BLAS_SINGLE)
  106. set(ALLOBJ ${SBLAS1} ${ALLBLAS}
  107. ${SBLAS2} ${SBLAS3})
  108. endif()
  109. if(BLAS_DOUBLE)
  110. set(ALLOBJ ${DBLAS1} ${ALLBLAS}
  111. ${DBLAS2} ${DBLAS3})
  112. endif()
  113. if(BLAS_COMPLEX)
  114. set(ALLOBJ ${BLASLIB} ${CBLAS1} ${CB1AUX}
  115. ${ALLBLAS} ${CBLAS2})
  116. endif()
  117. if(BLAS_COMPLEX16)
  118. set(ALLOBJ ${BLASLIB} ${ZBLAS1} ${ZB1AUX}
  119. ${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
  120. endif()
  121. add_library(blas ${ALLOBJ})
  122. if(UNIX)
  123. target_link_libraries(blas m)
  124. endif()
  125. target_link_libraries(blas)
  126. lapack_install_library(blas)