Suppressing warning about unused variables for selective build of MKLDNN plugin. (#4039)

This commit is contained in:
Vladislav Volkov 2021-01-29 13:11:50 +03:00 committed by GitHub
parent 450f01280a
commit 4b64c64c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,14 @@ ie_add_plugin(NAME ${TARGET_NAME}
set_ie_threading_interface_for(${TARGET_NAME})
if(SELECTIVE_BUILD STREQUAL "ON")
# After disabling a block of code, some variables might be unused.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
target_compile_options(${TARGET_NAME} PRIVATE -Wno-unused-variable)
endif()
endif()
target_link_libraries(${TARGET_NAME} PRIVATE mkldnn inference_engine inference_engine_legacy
inference_engine_transformations inference_engine_lp_transformations openvino::conditional_compilation)