Fixed CPU build (#18805)

This commit is contained in:
Ilya Lavrenov 2023-08-02 16:28:00 +04:00 committed by GitHub
parent af8e41bcea
commit 7be660e551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -282,7 +282,7 @@ function(set_ie_threading_interface_for TARGET_NAME)
foreach(include_directory IN LISTS include_directories)
# cannot include /usr/include headers as SYSTEM
if(NOT "${include_directory}" MATCHES "^/usr.*$")
target_include_directories(${TARGET_NAME} SYSTEM BEFORE
target_include_directories(${TARGET_NAME} SYSTEM
${LINK_TYPE} $<BUILD_INTERFACE:${include_directory}>)
else()
set(_system_library ON)

View File

@ -102,13 +102,10 @@ elseif(RISCV64)
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "openvino_riscv_cpu_plugin")
endif()
set_ie_threading_interface_for(${TARGET_NAME})
ie_mark_target_as_cc(${TARGET_NAME})
target_link_libraries(${TARGET_NAME} PRIVATE dnnl
ov_shape_inference
openvino::pugixml
inference_engine_snippets)
target_compile_definitions(${TARGET_NAME} PRIVATE IMPLEMENT_INFERENCE_EXTENSION_API)
@ -129,6 +126,10 @@ cross_compiled_file(${TARGET_NAME}
NAMESPACE InferenceEngine::Extensions::Cpu::XARCH
)
# system dependencies must go last
target_link_libraries(${TARGET_NAME} PRIVATE openvino::pugixml)
set_ie_threading_interface_for(${TARGET_NAME})
# must be called after all target_link_libraries
ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})