Commit 33c01206 authored by Christophe Favergeon's avatar Christophe Favergeon
Browse files

Added option for lax vector conversions when compiling Helium code.

In relation with issue #58

When HELIUM, MVEF or MVEI are used as cmake options, the option
LAXVECTORCONVERSIONS can be set to ON or OFF to enable / disable
lax vector conversions in GCC or ArmClang.

Currently, CMSIS-DSP won't build if lax vector conversions are disabled.
The option is ON by default.
parent 2458ff86
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ option(MVEFLOAT16 "Float16 MVE intrinsics supported" OFF)
option(DISABLEFLOAT16 "Disable building float16 kernels" OFF)
option(HOST "Build for host" OFF)
option(AUTOVECTORIZE "Prefer autovectorizable code to one using C intrinsics" OFF)
option(LAXVECTORCONVERSIONS "Lax vector conversions" ON)

# Select which parts of the CMSIS-DSP must be compiled.
# There are some dependencies between the parts but they are not tracked
+7 −1
Original line number Diff line number Diff line
@@ -50,7 +50,13 @@ endif()
if (MVEI OR MVEF OR HELIUM)
    # By default, GCC does not enable implicit conversion between vectors of different numbers or types of elements
    # which is required by some code in CMSIS-DSP
    if (LAXVECTORCONVERSIONS)
       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-flax-vector-conversions>)
       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=all>)
    else()
       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-fno-lax-vector-conversions>)
       target_compile_options(${project} PRIVATE $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=none>)
    endif()
endif()

if (DISABLEFLOAT16)