Don't require libm for the float-type math functions
This commit is contained in:
parent
d9544d006b
commit
deef98658b
@ -223,20 +223,27 @@ IF(NOT HAVE_GUIDDEF_H)
|
||||
ENDIF()
|
||||
CHECK_INCLUDE_FILE(arm_neon.h HAVE_ARM_NEON_H)
|
||||
|
||||
CHECK_LIBRARY_EXISTS(m powf "" HAVE_POWF)
|
||||
CHECK_LIBRARY_EXISTS(m sqrtf "" HAVE_SQRTF)
|
||||
CHECK_LIBRARY_EXISTS(m cosf "" HAVE_COSF)
|
||||
CHECK_LIBRARY_EXISTS(m sinf "" HAVE_SINF)
|
||||
CHECK_LIBRARY_EXISTS(m acosf "" HAVE_ACOSF)
|
||||
CHECK_LIBRARY_EXISTS(m asinf "" HAVE_ASINF)
|
||||
CHECK_LIBRARY_EXISTS(m atanf "" HAVE_ATANF)
|
||||
CHECK_LIBRARY_EXISTS(m fabsf "" HAVE_FABSF)
|
||||
IF(HAVE_FENV_H)
|
||||
CHECK_LIBRARY_EXISTS(m fesetround "" HAVE_FESETROUND)
|
||||
ENDIF()
|
||||
IF(HAVE_SQRTF OR HAVE_COSF OR HAVE_SINF OR HAVE_ACOSF OR HAVE_ASINF OR HAVE_ATANF OR HAVE_FABSF OR HAVE_FESETROUND)
|
||||
# Some systems need libm for some of the following math functions to work
|
||||
CHECK_LIBRARY_EXISTS(m pow "" HAVE_LIBM)
|
||||
IF(HAVE_LIBM)
|
||||
SET(EXTRA_LIBS m ${EXTRA_LIBS})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m)
|
||||
ENDIF()
|
||||
|
||||
|
||||
CHECK_SYMBOL_EXISTS(powf math.h HAVE_POWF)
|
||||
CHECK_SYMBOL_EXISTS(sqrtf math.h HAVE_SQRTF)
|
||||
CHECK_SYMBOL_EXISTS(cosf math.h HAVE_COSF)
|
||||
CHECK_SYMBOL_EXISTS(sinf math.h HAVE_SINF)
|
||||
CHECK_SYMBOL_EXISTS(acosf math.h HAVE_ACOSF)
|
||||
CHECK_SYMBOL_EXISTS(asinf math.h HAVE_ASINF)
|
||||
CHECK_SYMBOL_EXISTS(atanf math.h HAVE_ATANF)
|
||||
CHECK_SYMBOL_EXISTS(fabsf math.h HAVE_FABSF)
|
||||
|
||||
IF(HAVE_FENV_H)
|
||||
CHECK_SYMBOL_EXISTS(fesetround fenv.h HAVE_FESETROUND)
|
||||
ENDIF()
|
||||
|
||||
CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF)
|
||||
CHECK_FUNCTION_EXISTS(_controlfp HAVE__CONTROLFP)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user