Source: Fix configuration with GCC 14.3+ on machines with AVX10.1

When detecting C++ features, filter out a warning that is generated
by GCC >= 14.3 on, for example, Intel graniterapids machines.

Fixes: #27745
This commit is contained in:
u0139045
2026-04-17 11:23:26 -04:00
committed by Brad King
parent 79b4f78328
commit 6363b28e56
+2
View File
@@ -63,6 +63,8 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]*ld: warning: [^\n]*" "" check_output "${check_output}")
# Filter out distcc.
string(REGEX REPLACE "[^\n]*distcc\\[[0-9]+\\][^\n]*[Ww]arning:[^\n]*" "" check_output "${check_output}")
# Filter warning on Intel graniterapids CPUs
string(REGEX REPLACE "[^\n]*cc1[plus]*: warning: [^\n]*-mavx[^\n]* is aliased[^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)