use target attributes of gcc / clang for SIMD code.

This commit is contained in:
Ozkan Sezer
2023-03-17 20:57:40 +03:00
committed by Ozkan Sezer
parent cd7a3f8af5
commit 69de6964e5
12 changed files with 513 additions and 172 deletions

View File

@@ -735,7 +735,6 @@ if(SDL_ASSEMBLY)
cmake_pop_check_state()
if(CPU_SUPPORTS_AVX)
set(HAVE_AVX TRUE)
target_compile_options(sdl-build-options INTERFACE "-mavx")
endif()
endif()
@@ -760,7 +759,6 @@ if(SDL_ASSEMBLY)
cmake_pop_check_state()
if(CPU_SUPPORTS_MMX)
set(HAVE_MMX TRUE)
target_compile_options(sdl-build-options INTERFACE "-mmmx")
endif()
endif()
@@ -785,7 +783,6 @@ if(SDL_ASSEMBLY)
cmake_pop_check_state()
if(CPU_SUPPORTS_SSE)
set(HAVE_SSE ON)
target_compile_options(sdl-build-options INTERFACE "-msse")
endif()
endif()
@@ -810,7 +807,6 @@ if(SDL_ASSEMBLY)
cmake_pop_check_state()
if(CPU_SUPPORTS_SSE2)
set(HAVE_SSE2 TRUE)
target_compile_options(sdl-build-options INTERFACE "-msse2")
endif()
endif()
@@ -835,7 +831,6 @@ if(SDL_ASSEMBLY)
cmake_pop_check_state()
if(CPU_SUPPORTS_SSE3)
set(HAVE_SSE3 TRUE)
target_compile_options(sdl-build-options INTERFACE "-msse3")
endif()
endif()