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 2.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #######################################################################
  2. # This makefile creates the test programs for the BLAS 1 routines.
  3. # The test files are grouped as follows:
  4. # SBLAT1 -- Single precision real test routines
  5. # CBLAT1 -- Single precision complex test routines
  6. # DBLAT1 -- Double precision real test routines
  7. # ZBLAT1 -- Double precision complex test routines
  8. #
  9. # Test programs can be generated for all or some of the four different
  10. # precisions. To create the test programs, enter make followed by one
  11. # or more of the precisions desired. Some examples:
  12. # make single
  13. # make single complex
  14. # make single double complex complex16
  15. # Alternatively, the command
  16. # make
  17. # without any arguments creates all four test programs.
  18. # The executable files which are created are called
  19. # ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z
  20. #
  21. # To remove the object files after the executable files have been
  22. # created, enter
  23. # make clean
  24. # To force the source files to be recompiled, enter, for example,
  25. # make single FRC=FRC
  26. #
  27. #######################################################################
  28. macro(add_blas_test name src)
  29. get_filename_component(baseNAME ${src} NAME_WE)
  30. set(TEST_INPUT "${LAPACK_SOURCE_DIR}/BLAS/${baseNAME}.in")
  31. add_executable(${name} ${src})
  32. get_target_property(TEST_LOC ${name} LOCATION)
  33. target_link_libraries(${name} blas)
  34. if(EXISTS "${TEST_INPUT}")
  35. add_test(BLAS-${name} "${CMAKE_COMMAND}"
  36. -DTEST=${TEST_LOC}
  37. -DINPUT=${TEST_INPUT}
  38. -DINTDIR=${CMAKE_CFG_INTDIR}
  39. -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
  40. else()
  41. add_test(BLAS-${name} "${CMAKE_COMMAND}"
  42. -DTEST=${TEST_LOC}
  43. -DINTDIR=${CMAKE_CFG_INTDIR}
  44. -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
  45. endif()
  46. endmacro(add_blas_test)
  47. if(BUILD_SINGLE)
  48. add_blas_test(xblat1s sblat1.f)
  49. add_blas_test(xblat2s sblat2.f)
  50. add_blas_test(xblat3s sblat3.f)
  51. endif()
  52. if(BUILD_DOUBLE)
  53. add_blas_test(xblat1d dblat1.f)
  54. add_blas_test(xblat2d dblat2.f)
  55. add_blas_test(xblat3d dblat3.f)
  56. endif()
  57. if(BUILD_COMPLEX)
  58. add_blas_test(xblat1c cblat1.f)
  59. add_blas_test(xblat2c cblat2.f)
  60. add_blas_test(xblat3c cblat3.f)
  61. endif()
  62. if(BUILD_COMPLEX16)
  63. add_blas_test(xblat1z zblat1.f)
  64. add_blas_test(xblat2z zblat2.f)
  65. add_blas_test(xblat3z zblat3.f)
  66. endif()