numeric-linalg
Educational material on the SciPy implementation of numerical linear algebra algorithms
Name | Size | Mode | |
.. | |||
lapack/CBLAS/testing/CMakeLists.txt | 5218B | -rw-r--r-- |
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
####################################################################### # This CMakeLists.txt creates the test programs for the CBLAS routines. # ####################################################################### macro(add_cblas_test output input target) if(NOT "${input}" STREQUAL "") set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${input}") endif() set(TEST_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${output}") set(testName "${target}") if(DEFINED TEST_INPUT AND EXISTS "${TEST_INPUT}") add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}" -DTEST=$<TARGET_FILE:${target}> -DINPUT=${TEST_INPUT} -DOUTPUT=${TEST_OUTPUT} -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") else() add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}" -DTEST=$<TARGET_FILE:${target}> -DOUTPUT=${TEST_OUTPUT} -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() endmacro() # Object files for single precision real set(STESTL1O c_sblas1.c) set(STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c) set(STESTL3O c_sblas3.c c_s3chke.c auxiliary.c c_xerbla.c) # Object files for double precision real set(DTESTL1O c_dblas1.c) set(DTESTL2O c_dblas2.c c_d2chke.c auxiliary.c c_xerbla.c) set(DTESTL3O c_dblas3.c c_d3chke.c auxiliary.c c_xerbla.c) # Object files for single precision complex set(CTESTL1O c_cblat1.f c_cblas1.c) set(CTESTL2O c_cblas2.c c_c2chke.c auxiliary.c c_xerbla.c) set(CTESTL3O c_cblas3.c c_c3chke.c auxiliary.c c_xerbla.c) # Object files for double precision complex set(ZTESTL1O c_zblas1.c) set(ZTESTL2O c_zblas2.c c_z2chke.c auxiliary.c c_xerbla.c) set(ZTESTL3O c_zblas3.c c_z3chke.c auxiliary.c c_xerbla.c) if(BUILD_SINGLE) add_executable(xscblat1 c_sblat1.f ${STESTL1O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xscblat2 c_sblat2.f ${STESTL2O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xscblat3 c_sblat3.f ${STESTL3O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) if(HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xscblat1 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xscblat2 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xscblat3 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) endif() target_link_libraries(xscblat1 ${CBLASLIB}) target_link_libraries(xscblat2 ${CBLASLIB}) target_link_libraries(xscblat3 ${CBLASLIB}) add_cblas_test(stest1.out "" xscblat1) add_cblas_test(stest2.out sin2 xscblat2) add_cblas_test(stest3.out sin3 xscblat3) endif() if(BUILD_DOUBLE) add_executable(xdcblat1 c_dblat1.f ${DTESTL1O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xdcblat2 c_dblat2.f ${DTESTL2O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xdcblat3 c_dblat3.f ${DTESTL3O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) if(HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xdcblat1 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xdcblat2 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xdcblat3 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) endif() target_link_libraries(xdcblat1 ${CBLASLIB}) target_link_libraries(xdcblat2 ${CBLASLIB}) target_link_libraries(xdcblat3 ${CBLASLIB}) add_cblas_test(dtest1.out "" xdcblat1) add_cblas_test(dtest2.out din2 xdcblat2) add_cblas_test(dtest3.out din3 xdcblat3) endif() if(BUILD_COMPLEX) add_executable(xccblat1 c_cblat1.f ${CTESTL1O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xccblat2 c_cblat2.f ${CTESTL2O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xccblat3 c_cblat3.f ${CTESTL3O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) if(HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xccblat1 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xccblat2 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xccblat3 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) endif() target_link_libraries(xccblat1 ${CBLASLIB} ${BLAS_LIBRARIES}) target_link_libraries(xccblat2 ${CBLASLIB}) target_link_libraries(xccblat3 ${CBLASLIB}) add_cblas_test(ctest1.out "" xccblat1) add_cblas_test(ctest2.out cin2 xccblat2) add_cblas_test(ctest3.out cin3 xccblat3) endif() if(BUILD_COMPLEX16) add_executable(xzcblat1 c_zblat1.f ${ZTESTL1O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xzcblat2 c_zblat2.f ${ZTESTL2O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) add_executable(xzcblat3 c_zblat3.f ${ZTESTL3O} ${LAPACK_BINARY_DIR}/test_include/cblas_test.h) if(HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xzcblat1 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xzcblat2 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) target_compile_definitions(xzcblat3 PRIVATE HAS_ATTRIBUTE_WEAK_SUPPORT) endif() target_link_libraries(xzcblat1 ${CBLASLIB}) target_link_libraries(xzcblat2 ${CBLASLIB}) target_link_libraries(xzcblat3 ${CBLASLIB}) add_cblas_test(ztest1.out "" xzcblat1) add_cblas_test(ztest2.out zin2 xzcblat2) add_cblas_test(ztest3.out zin3 xzcblat3) endif()