1function(configDsp project)
2
3if (HOST)
4      target_compile_definitions(${project} PUBLIC __GNUC_PYTHON__)
5endif()
6
7if (LOOPUNROLL)
8  target_compile_definitions(${project} PRIVATE ARM_MATH_LOOPUNROLL)
9endif()
10
11if (ROUNDING)
12  target_compile_definitions(${project} PRIVATE ARM_MATH_ROUNDING)
13endif()
14
15if (MATRIXCHECK)
16  target_compile_definitions(${project} PRIVATE ARM_MATH_MATRIX_CHECK)
17endif()
18
19if (AUTOVECTORIZE)
20    target_compile_definitions(${project} PRIVATE ARM_MATH_AUTOVECTORIZE)
21endif()
22
23if (NEON)
24    # Used in arm_vec_math.h
25    target_include_directories(${project} PUBLIC "${DSP}/ComputeLibrary/Include")
26    target_compile_definitions(${project} PRIVATE ARM_MATH_NEON)
27
28endif()
29
30if (NEONEXPERIMENTAL)
31    # Used in arm_vec_math.h
32    target_include_directories(${project} PUBLIC "${DSP}/ComputeLibrary/Include")
33    target_compile_definitions(${project} PRIVATE ARM_MATH_NEON_EXPERIMENTAL)
34endif()
35
36if (MVEFLOAT16)
37    target_compile_definitions(${project} PRIVATE ARM_MATH_MVE_FLOAT16)
38endif()
39
40target_include_directories(${project} PRIVATE "${DSP}/PrivateInclude")
41
42if (MVEI OR MVEF OR HELIUM)
43    # By default, GCC does not enable implicit conversion between vectors of different numbers or types of elements
44    # which is required by some code in CMSIS-DSP
45    if (LAXVECTORCONVERSIONS)
46       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-flax-vector-conversions>)
47       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=integer>)
48    else()
49       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-fno-lax-vector-conversions>)
50       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=none>)
51    endif()
52endif()
53
54if (DISABLEFLOAT16)
55    target_compile_definitions(${project} PRIVATE DISABLEFLOAT16)
56endif()
57
58
59endfunction()
60