Skip to content

Commit

Permalink
Fix Warning as error for Android ARM64 build (#13638)
Browse files Browse the repository at this point in the history
* Fix Warning as error for Android ARM64 build

* Fixed preprocessing build

* Fixed cmake options

* Try to fix android build

* Disable some warning
  • Loading branch information
ilyachur authored Oct 26, 2022
1 parent 82942a1 commit 848d880
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cmake/developer_package/compile_flags/os_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,19 @@ macro(ie_arm_neon_optimization_flags flags)
# nothing
elseif(ANDROID)
if(ANDROID_ABI STREQUAL "arm64-v8a")
set(${flags} -mfpu=neon)
set(${flags} -mfpu=neon -Wno-unused-command-line-argument)
elseif(ANDROID_ABI STREQUAL "armeabi-v7a-hard with NEON")
set(${flags} -march=armv7-a -mfloat-abi=hard -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=neon)
set(${flags} -march=armv7-a -mfloat-abi=hard -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=neon -Wno-unused-command-line-argument)
elseif((ANDROID_ABI STREQUAL "armeabi-v7a with NEON") OR
(ANDROID_ABI STREQUAL "armeabi-v7a" AND
DEFINED CMAKE_ANDROID_ARM_NEON AND CMAKE_ANDROID_ARM_NEON))
set(${flags} -march=armv7-a -mfloat-abi=softfp -mfpu=neon)
set(${flags} -march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wno-unused-command-line-argument)
endif()
else()
if(AARCH64)
set(${flags} -O2 -ftree-vectorize)
elseif(ARM)
set(${flags} -mfpu=neon)
set(${flags} -mfpu=neon -Wno-unused-command-line-argument)
endif()
endif()
endmacro()
Expand Down
1 change: 0 additions & 1 deletion src/common/preprocessing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ if(ENABLE_GAPI_PREPROCESSING)
add_library(${TARGET_NAME}_obj OBJECT
${LIBRARY_SRC}
${LIBRARY_HEADERS})

ie_faster_build(${TARGET_NAME}_obj UNITY)

target_compile_definitions(${TARGET_NAME}_obj PRIVATE
Expand Down
1 change: 1 addition & 0 deletions src/core/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ie_add_compiler_flags(/wd4305)
ie_add_compiler_flags(/wd4244)
ie_add_compiler_flags(/wd4267)
ie_add_compiler_flags(/wd4834)
endif()

add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/core/models\")
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_subdirectory(nlohmann_json_schema_validator EXCLUDE_FROM_ALL)

set_target_properties(nlohmann_json_schema_validator PROPERTIES FOLDER thirdparty)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(nlohmann_json_schema_validator PRIVATE -Wno-switch -Wno-deprecated-declarations)
target_compile_options(nlohmann_json_schema_validator PRIVATE -Wno-switch -Wno-deprecated-declarations -Wno-range-loop-construct)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(nlohmann_json_schema_validator PRIVATE /wd4996)
endif()
Expand Down

0 comments on commit 848d880

Please sign in to comment.