Permalink
Browse files

cmake: added gnu89 Flag for Android (fixed warnings: implicit declara…

…tion of function 'name_of_function' is invalid in c99). Added set arch for Android system processors.
  • Loading branch information...
rafal1137 committed Dec 6, 2018
1 parent bfdd037 commit 8d0bf33e9c33f0309502affd3d324002567aa6c4
Showing with 7 additions and 0 deletions.
  1. +7 −0 cmake/ETLPlatform.cmake
7 cmake/ETLPlatform.cmake 100644 → 100755
@@ -55,6 +55,9 @@ if(UNIX)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__extern_always_inline=inline")
if(ANDROID)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -std=gnu89")
endif(ANDROID)
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall")
@@ -168,8 +171,12 @@ if(NOT APPLE)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7l")
set(ARCH "armv7")
#add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV7=1)
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7-a")
set(ARCH "armeabi-v7a")
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv8l")
set(ARCH "armv_64")
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set(ARCH "arm64-v8a")
else()
message(STATUS "Warning: processor architecture not recognised (${CMAKE_SYSTEM_PROCESSOR})")
endif()

0 comments on commit 8d0bf33

Please sign in to comment.