FrontEnds.cmake: FEM include headers as public (#9792)
ONNX/Paddle/TF frontends: added 'standalone_build' target to verify that frontends can be used standalone by applications
This commit is contained in:
parent
101e762969
commit
d8e557b39c
@ -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
|
||||
|
@ -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)
|
||||
|
13
src/core/tests/frontend/onnx/standalone_build/CMakeLists.txt
Normal file
13
src/core/tests/frontend/onnx/standalone_build/CMakeLists.txt
Normal file
@ -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})
|
@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2018-2022 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <openvino/frontend/onnx/frontend.hpp>
|
||||
|
||||
void test_load() {
|
||||
ov::frontend::onnx::FrontEnd fe;
|
||||
fe.get_name();
|
||||
}
|
@ -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)
|
||||
|
@ -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})
|
@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2018-2022 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <openvino/frontend/paddle/frontend.hpp>
|
||||
|
||||
void test_load() {
|
||||
ov::frontend::paddle::FrontEnd fe;
|
||||
fe.get_name();
|
||||
}
|
@ -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)
|
||||
|
@ -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})
|
@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2018-2022 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <openvino/frontend/tensorflow/frontend.hpp>
|
||||
|
||||
void test_load() {
|
||||
ov::frontend::tensorflow::FrontEnd fe;
|
||||
fe.get_name();
|
||||
}
|
Loading…
Reference in New Issue
Block a user