CMakeLists.txt 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. cmake_minimum_required (VERSION 3.14)
  2. project(CMSISDSPComplexMath)
  3. include(configLib)
  4. include(configDsp)
  5. add_library(CMSISDSPComplexMath STATIC)
  6. configLib(CMSISDSPComplexMath ${ROOT})
  7. configDsp(CMSISDSPComplexMath ${ROOT})
  8. include(interpol)
  9. interpol(CMSISDSPComplexMath)
  10. if (CONFIGTABLE AND ALLFAST)
  11. target_compile_definitions(CMSISDSPComplexMath PUBLIC ARM_ALL_FAST_TABLES)
  12. endif()
  13. # Vectorized code is defining sqrt
  14. # so fast tables required even if Fast Math not built.
  15. if (CONFIGTABLE AND (HELIUM OR MVEF OR MVEI))
  16. target_compile_definitions(CMSISDSPComplexMath PUBLIC ARM_FAST_ALLOW_TABLES)
  17. endif()
  18. # MVE code is using a table for computing the fast sqrt arm_cmplx_mag_q31
  19. # There is the possibility of not compiling this function and not including
  20. # the table.
  21. if (NOT CONFIGTABLE OR ALLFAST OR ARM_CMPLX_MAG_Q31 OR (NOT HELIUM AND NOT MVEI))
  22. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_q31.c)
  23. endif()
  24. if (NOT CONFIGTABLE OR ALLFAST OR ARM_CMPLX_MAG_Q15 OR (NOT HELIUM AND NOT MVEI))
  25. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_q15.c)
  26. endif()
  27. if (NOT CONFIGTABLE OR ALLFAST OR ARM_CMPLX_MAG_FAST_Q15 OR (NOT HELIUM AND NOT MVEI))
  28. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_fast_q15.c)
  29. endif()
  30. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_f32.c)
  31. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_q15.c)
  32. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_q31.c)
  33. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_f32.c)
  34. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_q15.c)
  35. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_q31.c)
  36. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_f32.c)
  37. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_f64.c)
  38. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_f32.c)
  39. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_f64.c)
  40. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_q15.c)
  41. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_q31.c)
  42. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_f32.c)
  43. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_f64.c)
  44. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_q15.c)
  45. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_q31.c)
  46. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_f32.c)
  47. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_q15.c)
  48. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_q31.c)
  49. if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
  50. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_f16.c)
  51. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_f16.c)
  52. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_f16.c)
  53. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_f16.c)
  54. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_f16.c)
  55. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_f16.c)
  56. endif()
  57. ### Includes
  58. target_include_directories(CMSISDSPComplexMath PUBLIC "${DSP}/Include")