SDL: cmake: add underscore in SSE4_1 and SSE4_2 options

From 0bd5ce13db568816eaa096ee5fcf12ad0c0a3c80 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 21 Mar 2023 16:57:09 +0100
Subject: [PATCH] cmake: add underscore in SSE4_1 and SSE4_2 options

---
 CMakeLists.txt                                | 28 +++++++++----------
 include/SDL3/SDL_intrin.h                     |  4 +--
 include/build_config/SDL_build_config.h.cmake |  4 +--
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18195b8ac9fa..d1008efa4040 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -373,8 +373,8 @@ dep_option(SDL_AVX512              "Use AVX512 assembly routines" ON "SDL_ASSEMB
 dep_option(SDL_SSE                 "Use SSE assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
 dep_option(SDL_SSE2                "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
 dep_option(SDL_SSE3                "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
-dep_option(SDL_SSE41               "Use SSE4.1 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
-dep_option(SDL_SSE42               "Use SSE4.2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
+dep_option(SDL_SSE4_1              "Use SSE4.1 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
+dep_option(SDL_SSE4_2              "Use SSE4.2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
 dep_option(SDL_MMX                 "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
 dep_option(SDL_ALTIVEC             "Use Altivec assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_POWERPC32 OR SDL_CPU_POWERPC64" OFF)
 dep_option(SDL_ARMSIMD             "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
@@ -798,7 +798,7 @@ if(SDL_ASSEMBLY)
       set(HAVE_SSE3 TRUE)
     endif()
   endif()
-  if(SDL_SSE41)
+  if(SDL_SSE4_1)
     cmake_push_check_state()
     if(USE_GCC OR USE_CLANG)
       set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -msse4.1")
@@ -813,13 +813,13 @@ if(SDL_ASSEMBLY)
       int main(int argc, char **argv) {
         ints_mul((int*)0, (int*)0, (int*)0, 0);
         return 0;
-      }" COMPILER_SUPPORTS_SSE41)
+      }" COMPILER_SUPPORTS_SSE4_1)
     cmake_pop_check_state()
-    if(COMPILER_SUPPORTS_SSE41)
-      set(HAVE_SSE41 TRUE)
+    if(COMPILER_SUPPORTS_SSE4_1)
+      set(HAVE_SSE4_1 TRUE)
     endif()
   endif()
-  if(SDL_SSE42)
+  if(SDL_SSE4_2)
     cmake_push_check_state()
     if(USE_GCC OR USE_CLANG)
       set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -msse4.2")
@@ -836,10 +836,10 @@ if(SDL_ASSEMBLY)
       int main(int argc, char **argv) {
         calc_crc32c(\"SDL_SSE4\",8);
         return 0;
-      }" COMPILER_SUPPORTS_SSE42)
+      }" COMPILER_SUPPORTS_SSE4_2)
     cmake_pop_check_state()
-    if(COMPILER_SUPPORTS_SSE42)
-      set(HAVE_SSE42 TRUE)
+    if(COMPILER_SUPPORTS_SSE4_2)
+      set(HAVE_SSE4_2 TRUE)
     endif()
   endif()
   if(SDL_AVX)
@@ -1044,12 +1044,12 @@ if(NOT HAVE_SSE3)
   set(SDL_DISABLE_SSE3 1)
 endif()
 
-if(NOT HAVE_SSE41)
-  set(SDL_DISABLE_SSE41 1)
+if(NOT HAVE_SSE4_1)
+  set(SDL_DISABLE_SSE4_1 1)
 endif()
 
-if(NOT HAVE_SSE42)
-  set(SDL_DISABLE_SSE42 1)
+if(NOT HAVE_SSE4_2)
+  set(SDL_DISABLE_SSE4_2 1)
 endif()
 
 if(NOT HAVE_AVX)
diff --git a/include/SDL3/SDL_intrin.h b/include/SDL3/SDL_intrin.h
index c44df98ef9ba..dc1ae030fd5b 100644
--- a/include/SDL3/SDL_intrin.h
+++ b/include/SDL3/SDL_intrin.h
@@ -132,11 +132,11 @@ _m_prefetch(void *__P)
 #  define SDL_SSE3_INTRINSICS 1
 #  include <pmmintrin.h>
 # endif
-# if (defined(_MSC_VER) || defined(__SSE4_1__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE41)
+# if (defined(_MSC_VER) || defined(__SSE4_1__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE4_1)
 #  define SDL_SSE4_1_INTRINSICS 1
 #  include <smmintrin.h>
 # endif
-# if (defined(_MSC_VER) || defined(__SSE4_2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE42)
+# if (defined(_MSC_VER) || defined(__SSE4_2__) || defined(SDL_HAS_TARGET_ATTRIBS)) && !defined(SDL_DISABLE_SSE4_2)
 #  define SDL_SSE4_2_INTRINSICS 1
 #  include <nmmintrin.h>
 # endif
diff --git a/include/build_config/SDL_build_config.h.cmake b/include/build_config/SDL_build_config.h.cmake
index 728fd0b83d59..3b7814ba4074 100644
--- a/include/build_config/SDL_build_config.h.cmake
+++ b/include/build_config/SDL_build_config.h.cmake
@@ -588,8 +588,8 @@ typedef unsigned int uintptr_t;
 #cmakedefine SDL_DISABLE_SSE 1
 #cmakedefine SDL_DISABLE_SSE2 1
 #cmakedefine SDL_DISABLE_SSE3 1
-#cmakedefine SDL_DISABLE_SSE41 1
-#cmakedefine SDL_DISABLE_SSE42 1
+#cmakedefine SDL_DISABLE_SSE4_1 1
+#cmakedefine SDL_DISABLE_SSE4_2 1
 #cmakedefine SDL_DISABLE_AVX 1
 #cmakedefine SDL_DISABLE_AVX2 1
 #cmakedefine SDL_DISABLE_AVX512F 1