mirror of https://github.com/libsdl-org/SDL
cmake: use CMakePushCheckState while testing ARM NEON support
This commit is contained in:
parent
46d85fd5a4
commit
21f8e3ce04
|
@ -962,7 +962,7 @@ if(SDL_ASSEMBLY)
|
|||
endif()
|
||||
|
||||
if(SDL_ARMNEON)
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
|
||||
check_c_source_compiles("
|
||||
.text
|
||||
|
@ -978,7 +978,7 @@ if(SDL_ASSEMBLY)
|
|||
pld [r0]
|
||||
vmovn.u16 d0, q0
|
||||
" ARMNEON_FOUND)
|
||||
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(ARMNEON_FOUND)
|
||||
set(HAVE_ARMNEON TRUE)
|
||||
|
|
Loading…
Reference in New Issue