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")