Disable fno-check-new on clang.

This commit is contained in:
C. Antonio Sanchez 2025-02-18 21:24:47 -08:00
parent 151f6127df
commit 66f7f51b7e

View File

@ -384,12 +384,17 @@ if (EIGEN_BUILD_TESTING)
ei_add_cxx_compiler_flag("-Wno-psabi")
ei_add_cxx_compiler_flag("-Wno-variadic-macros")
ei_add_cxx_compiler_flag("-Wno-long-long")
ei_add_cxx_compiler_flag("-fno-check-new")
ei_add_cxx_compiler_flag("-fno-common")
ei_add_cxx_compiler_flag("-fstrict-aliasing")
ei_add_cxx_compiler_flag("-wd981") # disable ICC's "operands are evaluated in unspecified order" remark
ei_add_cxx_compiler_flag("-wd2304") # disable ICC's "warning #2304: non-explicit constructor with single argument may cause implicit type conversion" produced by -Wnon-virtual-dtor
# Clang emits warnings about unused flag.
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
ei_add_cxx_compiler_flag("-fno-check-new")
endif()
if(ANDROID_NDK)
ei_add_cxx_compiler_flag("-pie")
ei_add_cxx_compiler_flag("-fPIE")