diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index 21341167fe99..a6a4f65472cb 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -49,7 +49,10 @@ endif() if(ARROW_CPU_FLAG STREQUAL "x86") # x86/amd64 compiler flags, msvc/gcc/clang if(MSVC) - set(ARROW_SSE4_2_FLAG "/arch:SSE4.2") + # The "/arch:SSE4.2" flag is not supported in x86 builds and is + # enabled by default in x64. Removed to avoid D9002 nuisance warnings. + # See https://learn.microsoft.com/cpp/build/reference/arch-x86 + set(ARROW_SSE4_2_FLAG "") # These definitions are needed for xsimd to consider the corresponding instruction # sets available, but they are not set by MSVC (unlike other compilers). # See https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4265