From 47413ce00b6d9f30f30e655daabcb8f065583a1e Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 18 Jan 2024 17:28:54 +0800 Subject: [PATCH] Fixed compilation on GHA CI --- src/plugins/intel_gna/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_gna/CMakeLists.txt b/src/plugins/intel_gna/CMakeLists.txt index ce51c8fc88a156..55efbff3d3e656 100644 --- a/src/plugins/intel_gna/CMakeLists.txt +++ b/src/plugins/intel_gna/CMakeLists.txt @@ -31,7 +31,6 @@ if(ENABLE_AVX2 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") add_compile_definitions(HAVE_AVX2=1) endif() - find_package(libGNA REQUIRED CONFIG PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake" @@ -51,15 +50,18 @@ ov_add_plugin(NAME ${TARGET_NAME} # Enable support of CC for the plugin ov_mark_target_as_cc(${TARGET_NAME}) -target_link_libraries(${TARGET_NAME} PRIVATE inference_engine_legacy - Threads::Threads libGNA) +target_link_libraries(${TARGET_NAME} PRIVATE inference_engine_legacy Threads::Threads libGNA) + target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) +target_include_directories(${TARGET_NAME} SYSTEM PRIVATE libGNA) target_compile_definitions(${TARGET_NAME} PRIVATE _NO_MKL_ ) +ov_set_threading_interface_for(${TARGET_NAME}) + # must be called after all target_link_libraries ov_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) @@ -80,6 +82,7 @@ target_compile_definitions(${TARGET_NAME}_test_static USE_STATIC_IE) target_link_libraries(${TARGET_NAME}_test_static PUBLIC inference_engine_s inference_engine_transformations libGNA::API) + target_include_directories(${TARGET_NAME}_test_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src @@ -87,6 +90,12 @@ target_include_directories(${TARGET_NAME}_test_static PRIVATE $) +target_include_directories(${TARGET_NAME}_test_static SYSTEM + PUBLIC + $) + +ov_set_threading_interface_for(${TARGET_NAME}_test_static) + set_target_properties(${TARGET_NAME} ${TARGET_NAME}_test_static PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})