diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake index 3a4450ae912..2fadf19fa3c 100644 --- a/cmake/developer_package/frontends/frontends.cmake +++ b/cmake/developer_package/frontends/frontends.cmake @@ -182,7 +182,8 @@ macro(ov_add_frontend) ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) - target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime ${OV_FRONTEND_LINK_LIBRARIES}) + target_link_libraries(${TARGET_NAME} PUBLIC openvino::runtime) + target_link_libraries(${TARGET_NAME} PRIVATE ${OV_FRONTEND_LINK_LIBRARIES}) # WA for TF frontends which always requires protobuf (not protobuf-lite) # if TF FE is built in static mode, use protobuf for all other FEs diff --git a/src/core/tests/frontend/onnx/CMakeLists.txt b/src/core/tests/frontend/onnx/CMakeLists.txt index 3e7656a9462..70a6f53e487 100644 --- a/src/core/tests/frontend/onnx/CMakeLists.txt +++ b/src/core/tests/frontend/onnx/CMakeLists.txt @@ -5,6 +5,7 @@ set(TARGET_NAME "onnx_frontend_tests") file(GLOB_RECURSE SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +list(FILTER SRC EXCLUDE REGEX standalone_build) add_executable(${TARGET_NAME} ${SRC}) @@ -24,3 +25,6 @@ target_compile_definitions(${TARGET_NAME} PRIVATE -D MANIFEST=\"${MANIFEST}\") add_dependencies(${TARGET_NAME} ov_onnx_frontend) add_dependencies(${TARGET_NAME} test_model_zoo) + +add_subdirectory(standalone_build) +add_dependencies(${TARGET_NAME} onnx_fe_standalone_build_test) diff --git a/src/core/tests/frontend/onnx/standalone_build/CMakeLists.txt b/src/core/tests/frontend/onnx/standalone_build/CMakeLists.txt new file mode 100644 index 00000000000..70f514783b1 --- /dev/null +++ b/src/core/tests/frontend/onnx/standalone_build/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (C) 2018-2022 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# +set(TARGET_NAME "onnx_fe_standalone_build_test") + +add_library(${TARGET_NAME} STATIC standalone_build_test.cpp) + +# This test verifies that application can link to ONNX frontend only +# Other dependencies on core header files will be resolved automatically +target_link_libraries(${TARGET_NAME} PUBLIC openvino::frontend::onnx) + +# Enable code style check +add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) diff --git a/src/core/tests/frontend/onnx/standalone_build/standalone_build_test.cpp b/src/core/tests/frontend/onnx/standalone_build/standalone_build_test.cpp new file mode 100644 index 00000000000..defbbc11f4e --- /dev/null +++ b/src/core/tests/frontend/onnx/standalone_build/standalone_build_test.cpp @@ -0,0 +1,10 @@ +// Copyright (C) 2018-2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +void test_load() { + ov::frontend::onnx::FrontEnd fe; + fe.get_name(); +} \ No newline at end of file diff --git a/src/core/tests/frontend/paddle/CMakeLists.txt b/src/core/tests/frontend/paddle/CMakeLists.txt index 7100957de64..387b9c90752 100644 --- a/src/core/tests/frontend/paddle/CMakeLists.txt +++ b/src/core/tests/frontend/paddle/CMakeLists.txt @@ -5,6 +5,7 @@ set(TARGET_NAME "paddle_tests") file(GLOB_RECURSE SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +list(FILTER SRC EXCLUDE REGEX standalone_build) add_executable(${TARGET_NAME} ${SRC}) @@ -61,3 +62,6 @@ add_dependencies(${TARGET_NAME} ov_paddle_frontend) if (ENABLE_INTEL_CPU) add_dependencies(${TARGET_NAME} ov_intel_cpu_plugin) endif() + +add_subdirectory(standalone_build) +add_dependencies(${TARGET_NAME} paddle_fe_standalone_build_test) diff --git a/src/core/tests/frontend/paddle/standalone_build/CMakeLists.txt b/src/core/tests/frontend/paddle/standalone_build/CMakeLists.txt new file mode 100644 index 00000000000..90694b95de9 --- /dev/null +++ b/src/core/tests/frontend/paddle/standalone_build/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (C) 2018-2022 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# +set(TARGET_NAME "paddle_fe_standalone_build_test") + +add_library(${TARGET_NAME} STATIC standalone_build_test.cpp) + +# This test verifies that application can link to Paddle frontend only +# Other dependencies on core header files will be resolved automatically +target_link_libraries(${TARGET_NAME} PUBLIC openvino::frontend::paddle) + +# Enable code style check +add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) diff --git a/src/core/tests/frontend/paddle/standalone_build/standalone_build_test.cpp b/src/core/tests/frontend/paddle/standalone_build/standalone_build_test.cpp new file mode 100644 index 00000000000..a02041afe31 --- /dev/null +++ b/src/core/tests/frontend/paddle/standalone_build/standalone_build_test.cpp @@ -0,0 +1,10 @@ +// Copyright (C) 2018-2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +void test_load() { + ov::frontend::paddle::FrontEnd fe; + fe.get_name(); +} \ No newline at end of file diff --git a/src/core/tests/frontend/tensorflow/CMakeLists.txt b/src/core/tests/frontend/tensorflow/CMakeLists.txt index 0e46f242e10..9d64d17a197 100644 --- a/src/core/tests/frontend/tensorflow/CMakeLists.txt +++ b/src/core/tests/frontend/tensorflow/CMakeLists.txt @@ -5,6 +5,7 @@ set(TARGET_NAME "tensorflow_tests") file(GLOB_RECURSE SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +list(FILTER SRC EXCLUDE REGEX standalone_build) add_executable(${TARGET_NAME} ${SRC}) @@ -67,3 +68,6 @@ add_dependencies(${TARGET_NAME} ov_tensorflow_frontend) get_target_property(TENSORFLOW_FRONTEND_SRC_DIR ov_tensorflow_frontend SOURCE_DIR) target_include_directories(${TARGET_NAME} PRIVATE ${TENSORFLOW_FRONTEND_SRC_DIR}/src/pass/) + +add_subdirectory(standalone_build) +add_dependencies(${TARGET_NAME} tensorflow_fe_standalone_build_test) diff --git a/src/core/tests/frontend/tensorflow/standalone_build/CMakeLists.txt b/src/core/tests/frontend/tensorflow/standalone_build/CMakeLists.txt new file mode 100644 index 00000000000..449d02ec176 --- /dev/null +++ b/src/core/tests/frontend/tensorflow/standalone_build/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (C) 2018-2022 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# +set(TARGET_NAME "tensorflow_fe_standalone_build_test") + +add_library(${TARGET_NAME} STATIC standalone_build_test.cpp) + +# This test verifies that application can link to TensorFlow frontend only +# Other dependencies on core header files will be resolved automatically +target_link_libraries(${TARGET_NAME} PUBLIC ov_tensorflow_frontend) + +# Enable code style check +add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) diff --git a/src/core/tests/frontend/tensorflow/standalone_build/standalone_build_test.cpp b/src/core/tests/frontend/tensorflow/standalone_build/standalone_build_test.cpp new file mode 100644 index 00000000000..16eb55fe438 --- /dev/null +++ b/src/core/tests/frontend/tensorflow/standalone_build/standalone_build_test.cpp @@ -0,0 +1,10 @@ +// Copyright (C) 2018-2022 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +void test_load() { + ov::frontend::tensorflow::FrontEnd fe; + fe.get_name(); +} \ No newline at end of file