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

Openblas.cmake 908B

1234567891011121314151617181920212223242526
  1. option (ENABLE_BLAS "Enable openblas for fast neural network processing [default: OFF]" OFF)
  2. IF(ENABLE_BLAS MATCHES "ON")
  3. ProcessPackage(BLAS OPTIONAL_INCLUDE LIBRARY openblas blas
  4. INCLUDE cblas.h INCLUDE_SUFFIXES include/openblas
  5. include/blas
  6. ROOT ${BLAS_ROOT_DIR}
  7. LIB_OUTPUT BLAS_REQUIRED_LIBRARIES)
  8. ENDIF()
  9. IF(WITH_BLAS)
  10. MESSAGE(STATUS "Use openblas to accelerate kann")
  11. IF(NOT BLAS_INCLUDE)
  12. FIND_FILE(HAVE_CBLAS_H HINTS "${RSPAMD_SEARCH_PATH}"
  13. NAMES cblas.h
  14. DOC "Path to cblas.h header")
  15. IF(NOT HAVE_CBLAS_H)
  16. MESSAGE(STATUS "Blas header cblas.h has not been found, use internal workaround")
  17. ELSE()
  18. ADD_DEFINITIONS(-DHAVE_CBLAS_H)
  19. ENDIF()
  20. ELSE()
  21. ADD_DEFINITIONS(-DHAVE_CBLAS_H)
  22. ENDIF()
  23. ADD_DEFINITIONS(-DHAVE_CBLAS)
  24. ENDIF(WITH_BLAS)