Skip to content

Commit

Permalink
Suppressing warning about unused variables for selective build of MKL…
Browse files Browse the repository at this point in the history
…DNN plugin.
  • Loading branch information
vladislav-volkov committed Jan 27, 2021
1 parent 344494a commit 1923264
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions inference-engine/src/mkldnn_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ 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.
target_compile_options(${TARGET_NAME} PRIVATE -Wno-unused-variable)
endif()

target_link_libraries(${TARGET_NAME} PRIVATE mkldnn inference_engine inference_engine_legacy
inference_engine_transformations inference_engine_lp_transformations openvino::conditional_compilation)

Expand Down Expand Up @@ -202,6 +207,11 @@ target_include_directories(${TARGET_NAME}_obj PRIVATE $<TARGET_PROPERTY:inferenc

set_ie_threading_interface_for(${TARGET_NAME}_obj)

if(SELECTIVE_BUILD STREQUAL "ON")
# After disabling a block of code, some variables might be unused.
target_compile_options(${TARGET_NAME}_obj PRIVATE -Wno-unused-variable)
endif()

target_compile_definitions(${TARGET_NAME}_obj
PRIVATE USE_STATIC_IE IMPLEMENT_INFERENCE_ENGINE_PLUGIN
)
Expand Down

0 comments on commit 1923264

Please sign in to comment.