cmake:bugfix fix sim CMake build break

fix lim CMake config prefix error

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-07-22 17:23:17 +08:00 committed by Xiang Xiao
parent ec99359812
commit 997be40003

View File

@ -24,7 +24,6 @@ if(CONFIG_LIBM)
endif() endif()
# Add the floating point math C files to the build # Add the floating point math C files to the build
set(SRCS set(SRCS
lib_acosf.c lib_acosf.c
lib_asinf.c lib_asinf.c
@ -33,7 +32,6 @@ if(CONFIG_LIBM)
lib_cosf.c lib_cosf.c
lib_coshf.c lib_coshf.c
lib_expf.c lib_expf.c
lib_fabsf.c
lib_fmodf.c lib_fmodf.c
lib_frexpf.c lib_frexpf.c
lib_ldexpf.c lib_ldexpf.c
@ -44,7 +42,6 @@ if(CONFIG_LIBM)
lib_powf.c lib_powf.c
lib_sinf.c lib_sinf.c
lib_sinhf.c lib_sinhf.c
lib_sqrtf.c
lib_tanf.c lib_tanf.c
lib_tanhf.c lib_tanhf.c
lib_asinhf.c lib_asinhf.c
@ -52,6 +49,12 @@ if(CONFIG_LIBM)
lib_atanhf.c lib_atanhf.c
lib_erff.c lib_erff.c
lib_copysignf.c lib_copysignf.c
lib_scalbnf.c
lib_scalbn.c
lib_scalbnl.c
lib_sincos.c
lib_sincosf.c
lib_sincosl.c
lib_acos.c lib_acos.c
lib_asin.c lib_asin.c
lib_atan.c lib_atan.c
@ -128,6 +131,12 @@ if(CONFIG_LIBM)
lib_nan.c lib_nan.c
lib_nanf.c lib_nanf.c
lib_nanl.c lib_nanl.c
lib_fmax.c
lib_fmaxf.c
lib_fmaxl.c
lib_fmin.c
lib_fminf.c
lib_fminl.c
__cos.c __cos.c
__sin.c __sin.c
lib_gamma.c lib_gamma.c
@ -136,45 +145,53 @@ if(CONFIG_LIBM)
# Use the C versions of some functions only if architecture specific optimized # Use the C versions of some functions only if architecture specific optimized
# versions are not provided. # versions are not provided.
if(NOT LIBM_ARCH_CEIL) if(NOT CONFIG_LIBM_ARCH_CEIL)
list(APPEND SRCS lib_ceil.c) list(APPEND SRCS lib_ceil.c)
endif() endif()
if(NOT LIBM_ARCH_FLOOR) if(NOT CONFIG_LIBM_ARCH_FLOOR)
list(APPEND SRCS lib_floor.c) list(APPEND SRCS lib_floor.c)
endif() endif()
if(NOT LIBM_ARCH_RINT) if(NOT CONFIG_LIBM_ARCH_RINT)
list(APPEND SRCS lib_rint.c) list(APPEND SRCS lib_rint.c)
endif() endif()
if(NOT LIBM_ARCH_ROUND) if(NOT CONFIG_LIBM_ARCH_ROUND)
list(APPEND SRCS lib_round.c) list(APPEND SRCS lib_round.c)
endif() endif()
if(NOT LIBM_ARCH_TRUNC) if(NOT CONFIG_LIBM_ARCH_TRUNC)
list(APPEND SRCS lib_trunc.c) list(APPEND SRCS lib_trunc.c)
endif() endif()
if(NOT LIBM_ARCH_CEILF) if(NOT CONFIG_LIBM_ARCH_CEILF)
list(APPEND SRCS lib_ceilf.c) list(APPEND SRCS lib_ceilf.c)
endif() endif()
if(NOT LIBM_ARCH_FLOORF) if(NOT CONFIG_LIBM_ARCH_FLOORF)
list(APPEND SRCS lib_floorf.c) list(APPEND SRCS lib_floorf.c)
endif() endif()
if(NOT LIBM_ARCH_RINTF) if(NOT CONFIG_LIBM_ARCH_RINTF)
list(APPEND SRCS lib_rintf.c) list(APPEND SRCS lib_rintf.c)
endif() endif()
if(NOT LIBM_ARCH_ROUNDF) if(NOT CONFIG_LIBM_ARCH_ROUNDF)
list(APPEND SRCS lib_roundf.c) list(APPEND SRCS lib_roundf.c)
endif() endif()
if(NOT LIBM_ARCH_TRUNCF) if(NOT CONFIG_LIBM_ARCH_TRUNCF)
list(APPEND SRCS lib_truncf.c) list(APPEND SRCS lib_truncf.c)
endif() endif()
if(NOT CONFIG_LIBM_ARCH_FABSF)
list(APPEND SRCS lib_fabsf.c)
endif()
if(NOT CONFIG_LIBM_ARCH_SQRTF)
list(APPEND SRCS lib_sqrtf.c)
endif()
target_sources(c PRIVATE ${SRCS}) target_sources(c PRIVATE ${SRCS})
endif() endif()