mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Suppress false-positive GCC and clang warnings in test builds
libeigen/eigen!2187 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -336,6 +336,12 @@ else()
|
||||
set(EIGEN_FASTMATH_FLAGS "/fp:fast")
|
||||
endif()
|
||||
endif()
|
||||
# The fastmath test intentionally uses NaN/infinity under -ffast-math.
|
||||
# Suppress the clang warning about this being technically undefined.
|
||||
check_cxx_compiler_flag("-Wno-nan-infinity-disabled" COMPILER_SUPPORT_WNO_NAN_INF)
|
||||
if(COMPILER_SUPPORT_WNO_NAN_INF)
|
||||
set(EIGEN_FASTMATH_FLAGS "${EIGEN_FASTMATH_FLAGS} -Wno-nan-infinity-disabled")
|
||||
endif()
|
||||
|
||||
ei_add_test(fastmath "${EIGEN_FASTMATH_FLAGS}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user