diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index ce10d767bff..45f6863dece 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -6,7 +6,10 @@ add_subdirectory(itt) add_subdirectory(conditional_compilation) add_subdirectory(util) -add_subdirectory(snippets) +if(ENABLE_INTEL_CPU) + add_subdirectory(snippets) +endif() + add_subdirectory(transformations) add_subdirectory(offline_transformations) add_subdirectory(low_precision_transformations) diff --git a/src/tests/functional/plugin/shared/CMakeLists.txt b/src/tests/functional/plugin/shared/CMakeLists.txt index 7db0704f80b..aee3c039020 100644 --- a/src/tests/functional/plugin/shared/CMakeLists.txt +++ b/src/tests/functional/plugin/shared/CMakeLists.txt @@ -8,6 +8,10 @@ set(PUBLIC_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") set(DEPENDENCIES mock_engine) +list(APPEND LINK_LIBRARIES_PRIVATE + openvino::util + openvino::runtime::dev) + if(ENABLE_HETERO) list(APPEND DEPENDENCIES openvino_hetero_plugin) endif() @@ -33,6 +37,12 @@ else() set(EXCLUDED_SOURCE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src/onnx) endif() +if (TARGET inference_engine_snippets) + list(APPEND LINK_LIBRARIES_PRIVATE snippetsNgraphFunctions) +else() + list(APPEND EXCLUDED_SOURCE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src/snippets) +endif() + addIeTarget( NAME ${TARGET_NAME} TYPE STATIC @@ -56,9 +66,7 @@ addIeTarget( lptNgraphFunctions sharedTestClasses PRIVATE - openvino::util - openvino::runtime::dev - snippetsNgraphFunctions + ${LINK_LIBRARIES_PRIVATE} DEPENDENCIES ${DEPENDENCIES} ) diff --git a/src/tests/ngraph_helpers/CMakeLists.txt b/src/tests/ngraph_helpers/CMakeLists.txt index 0b2913de33f..fd2beb23711 100644 --- a/src/tests/ngraph_helpers/CMakeLists.txt +++ b/src/tests/ngraph_helpers/CMakeLists.txt @@ -4,4 +4,7 @@ add_subdirectory(ngraph_functions) add_subdirectory(lpt_ngraph_functions) -add_subdirectory(snippets_ngraph_functions) + +if(TARGET inference_engine_snippets) + add_subdirectory(snippets_ngraph_functions) +endif()