diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt index dc45c468664aca..6e066a4656c384 100644 --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt @@ -34,7 +34,7 @@ ie_mark_target_as_cc(${TARGET_NAME}) if(SELECTIVE_BUILD STREQUAL "ON") # After disabling a block of code, some variables might be unused. - if(CMAKE_COMPILER_IS_GNUCXX) + if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) target_compile_options(${TARGET_NAME} PRIVATE -Wno-unused-variable) endif() endif() diff --git a/ngraph/frontend/onnx/onnx_import/CMakeLists.txt b/ngraph/frontend/onnx/onnx_import/CMakeLists.txt index 2c0505c9f44b8d..b8eab155d9784c 100644 --- a/ngraph/frontend/onnx/onnx_import/CMakeLists.txt +++ b/ngraph/frontend/onnx/onnx_import/CMakeLists.txt @@ -63,10 +63,8 @@ if(NGRAPH_USE_PROTOBUF_LITE) target_compile_definitions(onnx_importer PRIVATE NGRAPH_USE_PROTOBUF_LITE) endif() -if (OV_COMPILER_IS_CLANG) - target_compile_options(onnx_importer PRIVATE -Wno-undef -Wno-reserved-id-macro -Wno-switch-enum - -Wno-invalid-offsetof -Wno-shorten-64-to-32 -Wno-unused-macros -Wno-missing-variable-declarations - -Wno-unused-private-field -Wno-shadow -Wno-deprecated PUBLIC -Wno-undefined-func-template) +if(OV_COMPILER_IS_CLANG) + target_compile_options(onnx_importer PRIVATE -Wno-undef) endif() install(TARGETS onnx_importer EXPORT ngraphTargets diff --git a/openvino/conditional_compilation/CMakeLists.txt b/openvino/conditional_compilation/CMakeLists.txt index 3927e2e95d816e..daadd1c83207b6 100644 --- a/openvino/conditional_compilation/CMakeLists.txt +++ b/openvino/conditional_compilation/CMakeLists.txt @@ -25,7 +25,7 @@ elseif(SELECTIVE_BUILD STREQUAL "ON") target_compile_definitions(${TARGET_NAME} INTERFACE SELECTIVE_BUILD) - if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OV_COMPILER_IS_CLANG) + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR OV_COMPILER_IS_CLANG) # After disabling a block of code, some variables might be unused. target_compile_options(${TARGET_NAME} INTERFACE -Wno-unused-function