Fix Warning as error for Android ARM64 build (#13638)

* Fix Warning as error for Android ARM64 build

* Fixed preprocessing build

* Fixed cmake options

* Try to fix android build

* Disable some warning
This commit is contained in:
Ilya Churaev 2022-10-26 12:56:44 +04:00 committed by GitHub
parent 82942a12b2
commit 848d880eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -141,19 +141,19 @@ macro(ie_arm_neon_optimization_flags flags)
# nothing # nothing
elseif(ANDROID) elseif(ANDROID)
if(ANDROID_ABI STREQUAL "arm64-v8a") 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") 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 elseif((ANDROID_ABI STREQUAL "armeabi-v7a with NEON") OR
(ANDROID_ABI STREQUAL "armeabi-v7a" AND (ANDROID_ABI STREQUAL "armeabi-v7a" AND
DEFINED CMAKE_ANDROID_ARM_NEON AND CMAKE_ANDROID_ARM_NEON)) 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() endif()
else() else()
if(AARCH64) if(AARCH64)
set(${flags} -O2 -ftree-vectorize) set(${flags} -O2 -ftree-vectorize)
elseif(ARM) elseif(ARM)
set(${flags} -mfpu=neon) set(${flags} -mfpu=neon -Wno-unused-command-line-argument)
endif() endif()
endif() endif()
endmacro() endmacro()

View File

@ -97,7 +97,6 @@ if(ENABLE_GAPI_PREPROCESSING)
add_library(${TARGET_NAME}_obj OBJECT add_library(${TARGET_NAME}_obj OBJECT
${LIBRARY_SRC} ${LIBRARY_SRC}
${LIBRARY_HEADERS}) ${LIBRARY_HEADERS})
ie_faster_build(${TARGET_NAME}_obj UNITY) ie_faster_build(${TARGET_NAME}_obj UNITY)
target_compile_definitions(${TARGET_NAME}_obj PRIVATE target_compile_definitions(${TARGET_NAME}_obj PRIVATE

View File

@ -14,6 +14,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ie_add_compiler_flags(/wd4305) ie_add_compiler_flags(/wd4305)
ie_add_compiler_flags(/wd4244) ie_add_compiler_flags(/wd4244)
ie_add_compiler_flags(/wd4267) ie_add_compiler_flags(/wd4267)
ie_add_compiler_flags(/wd4834)
endif() endif()
add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/core/models\") add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/core/models\")

View File

@ -15,7 +15,7 @@ add_subdirectory(nlohmann_json_schema_validator EXCLUDE_FROM_ALL)
set_target_properties(nlohmann_json_schema_validator PROPERTIES FOLDER thirdparty) set_target_properties(nlohmann_json_schema_validator PROPERTIES FOLDER thirdparty)
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) 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") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(nlohmann_json_schema_validator PRIVATE /wd4996) target_compile_options(nlohmann_json_schema_validator PRIVATE /wd4996)
endif() endif()