CMakeLists.txt 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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(CMSISDSPFastMath)
  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. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_f32.c)
  28. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_q15.c)
  29. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_q31.c)
  30. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_f32.c)
  31. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_q15.c)
  32. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_q31.c)
  33. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_f32.c)
  34. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_f32.c)
  35. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_q15.c)
  36. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_q31.c)
  37. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_f32.c)
  38. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_q15.c)
  39. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_q31.c)
  40. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_f32.c)
  41. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_q15.c)
  42. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_q31.c)
  43. if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
  44. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_conj_f16.c)
  45. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_dot_prod_f16.c)
  46. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_f16.c)
  47. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mag_squared_f16.c)
  48. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_cmplx_f16.c)
  49. target_sources(CMSISDSPComplexMath PRIVATE arm_cmplx_mult_real_f16.c)
  50. endif()
  51. ### Includes
  52. target_include_directories(CMSISDSPComplexMath PUBLIC "${DSP}/Include")