From b787a57bf24ccd47380a97ee7b0468f095363273 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 6 Jun 2021 16:15:26 +0800 Subject: [PATCH] Improve astc cmake for ios --- external/astc/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/external/astc/CMakeLists.txt b/external/astc/CMakeLists.txt index ca87a61807..e28cb816a9 100644 --- a/external/astc/CMakeLists.txt +++ b/external/astc/CMakeLists.txt @@ -71,13 +71,10 @@ if (NOT DEFINED ISA_SIMD) }" ASTC_HAVE_SSE4_INTRINSICS) endif() - ### restore CMAKE_REQUIRED_FLAGS - set(CMAKE_REQUIRED_FLAGS ${OLD_REQUIRED_FLAGS}) - unset(OLD_REQUIRED_FLAGS) - ### check neon check_include_file(arm_neon.h ASTC_HAVE_ARM_NEON_H) if(ASTC_HAVE_ARM_NEON_H) + set(CMAKE_REQUIRED_FLAGS "-std=c++11") check_cxx_source_compiles("#include int main() { @@ -88,6 +85,10 @@ if (NOT DEFINED ISA_SIMD) }" ASTC_HAVE_NEON_INTRINSICS) endif() + ### restore CMAKE_REQUIRED_FLAGS + set(CMAKE_REQUIRED_FLAGS ${OLD_REQUIRED_FLAGS}) + unset(OLD_REQUIRED_FLAGS) + ### set ISA_SIMD if(ASTC_HAVE_MSSE2_SWITCH) set(ISA_SIMD "sse2")