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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. include_directories(${PROJECT_SOURCE_DIR})
  2. if (${CORE} STREQUAL "PPC440")
  3. set(MEMORY memory_qalloc.c)
  4. else ()
  5. set(MEMORY memory.c)
  6. endif ()
  7. if (SMP)
  8. if (USE_OPENMP)
  9. set(BLAS_SERVER blas_server_omp.c)
  10. elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
  11. set(BLAS_SERVER blas_server_win32.c)
  12. elseif (${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
  13. set(BLAS_SERVER blas_server_win32.c)
  14. endif ()
  15. if (NOT DEFINED BLAS_SERVER)
  16. set(BLAS_SERVER blas_server.c)
  17. endif ()
  18. set(SMP_SOURCES
  19. ${BLAS_SERVER}
  20. divtable.c # TODO: Makefile has -UDOUBLE
  21. blas_l1_thread.c
  22. )
  23. if (NOT NO_AFFINITY)
  24. list(APPEND SMP_SOURCES init.c)
  25. endif ()
  26. endif ()
  27. set(COMMON_SOURCES
  28. xerbla.c
  29. openblas_set_num_threads.c
  30. openblas_error_handle.c
  31. openblas_env.c
  32. openblas_get_num_procs.c
  33. openblas_get_num_threads.c
  34. )
  35. # these need to have NAME/CNAME set, so use GenerateNamedObjects, but don't use standard name mangling
  36. GenerateNamedObjects("abs.c" "" "c_abs" 0 "" "" 1 )
  37. GenerateNamedObjects("abs.c" "DOUBLE" "z_abs" 0 "" "" 1)
  38. GenerateNamedObjects("openblas_get_config.c;openblas_get_parallel.c" "" "" 0 "" "" 1)
  39. if (DYNAMIC_ARCH)
  40. list(APPEND COMMON_SOURCES dynamic.c)
  41. else ()
  42. list(APPEND COMMON_SOURCES parameter.c)
  43. endif ()
  44. #ifdef EXPRECISION
  45. #COMMONOBJS += x_abs.$(SUFFIX) qlamch.$(SUFFIX) qlamc3.$(SUFFIX)
  46. #endif
  47. #
  48. #ifdef QUAD_PRECISION
  49. #COMMONOBJS += addx.$(SUFFIX) mulx.$(SUFFIX)
  50. #endif
  51. #
  52. #ifdef USE_CUDA
  53. #COMMONOBJS += cuda_init.$(SUFFIX)
  54. #endif
  55. #
  56. #ifdef FUNCTION_PROFILE
  57. #COMMONOBJS += profile.$(SUFFIX)
  58. #endif
  59. #LIBOTHERS = libothers.$(LIBSUFFIX)
  60. #ifeq ($(DYNAMIC_ARCH), 1)
  61. #HPLOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) dynamic.$(SUFFIX)
  62. #else
  63. #HPLOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) parameter.$(SUFFIX)
  64. #endif
  65. add_library(driver_others OBJECT ${OPENBLAS_SRC} ${MEMORY} ${SMP_SOURCES} ${COMMON_SOURCES})