Removed EXPORT_DEPENDENCIES from addIeTarget (#6502)

* Added pugixml as submodule

* CVS-34900: updated pugixml to v1.11.4

* Fixed link with pugixml

* USe pugixml::static

* Try to fix bug

* Removed GITHUB_PULL_REQUEST

* Replaced  OpenVINO_MAIN_SOURCE_DIR -> OpenVINO_SOURCE_DIR

* Removed some usages of IE_MAIN_SOURCE_DIR

* Use ngraph target directly

* Removed EXPORT_DEPENDENCIES
This commit is contained in:
Ilya Lavrenov 2021-07-02 17:17:44 +03:00 committed by GitHub
parent 00c8ccc9b5
commit 8cc1737b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 37 additions and 75 deletions

View File

@ -20,8 +20,6 @@ addIeTarget(
/some/specific/path
LINK_LIBRARIES
ie::important_plugin
EXPORT_DEPENDENCIES
dependency_lib_to_export
DEPENDENCIES
dependencies
OBJECT_FILES
@ -51,7 +49,6 @@ function(addIeTarget)
EXCLUDED_SOURCE_PATHS # list of paths excluded from the global recursive search of source files
LINK_LIBRARIES_WHOLE_ARCHIVE # list of static libraries to link, each object file should be used and not discarded
LINK_FLAGS # list of extra commands to linker
EXPORT_DEPENDENCIES # list of the dependencies to be exported with the target through the developer package
)
cmake_parse_arguments(ARG "${options}" "${oneValueRequiredArgs};${oneValueOptionalArgs}" "${multiValueArgs}" ${ARGN} )
@ -127,7 +124,7 @@ function(addIeTarget)
if (ARG_DEVELOPER_PACKAGE)
# developer package
openvino_developer_export_targets(COMPONENT ${ARG_DEVELOPER_PACKAGE}
TARGETS ${ARG_NAME} ${ARG_EXPORT_DEPENDENCIES})
TARGETS ${ARG_NAME})
endif()
if(WIN32)
# Provide default compile pdb name equal to target name

View File

@ -31,7 +31,6 @@ target_link_libraries(${TARGET_NAME} PRIVATE
# Link inference backend library to plugin. Here we use ngraph interpreter_backend as example
target_link_libraries(${TARGET_NAME} PRIVATE
IE::ngraph_backend
IE::interpreter_backend)
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})

View File

@ -4,13 +4,8 @@
set (TARGET_NAME "format_reader")
file (GLOB MAIN_SRC
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
)
file (GLOB LIBRARY_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/*.h
)
file (GLOB MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file (GLOB LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
# Create named folders for the sources within the .vcproj
# Empty name lists them directly under the .vcproj
@ -18,7 +13,7 @@ source_group("src" FILES ${LIBRARY_SRC})
source_group("include" FILES ${LIBRARY_HEADERS})
# Create library file from sources.
add_library(${TARGET_NAME} SHARED ${MAIN_SRC} ${LIBRARY_HEADERS})
add_library(${TARGET_NAME} SHARED EXCLUDE_FROM_ALL ${MAIN_SRC} ${LIBRARY_HEADERS})
# Find OpenCV components if exist
find_package(OpenCV COMPONENTS core imgproc imgcodecs QUIET)

View File

@ -6,7 +6,7 @@ set(TARGET_NAME "ie_samples_utils")
file(GLOB_RECURSE SOURCES "*.cpp" "*.hpp" "*.h")
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES})
add_library(${TARGET_NAME} STATIC ${SOURCES})
add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES})
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "src")
target_include_directories(${TARGET_NAME}

View File

@ -181,7 +181,7 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
# Static library used for unit tests which are always built
add_library(${TARGET_NAME}_s STATIC
add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
$<TARGET_OBJECTS:${TARGET_NAME}_legacy_obj>
$<TARGET_OBJECTS:${TARGET_NAME}_obj>
${IE_STATIC_DEPENDENT_FILES})

View File

@ -17,7 +17,7 @@ source_group("include" FILES ${PUBLIC_HEADERS})
# Create static library
add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${LIBRARY_SRC} ${PUBLIC_HEADERS})
target_link_libraries(${TARGET_NAME} PUBLIC ngraph inference_engine_transformations ngraph::reference
PRIVATE openvino::itt pugixml::static)

View File

@ -142,7 +142,7 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
# Static library used for unit tests which are always built
add_library(${TARGET_NAME}_s STATIC
add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
$<TARGET_OBJECTS:${TARGET_NAME}_obj>)
set_ie_threading_interface_for(${TARGET_NAME}_s)

View File

@ -16,7 +16,7 @@ source_group("src" FILES ${LIBRARY_SRC})
# Create module library
add_library(${TARGET_NAME} MODULE ${LIBRARY_SRC})
add_library(${TARGET_NAME} MODULE EXCLUDE_FROM_ALL ${LIBRARY_SRC})
ie_faster_build(${TARGET_NAME}
UNITY

View File

@ -5,7 +5,11 @@
file(GLOB_RECURSE SOURCES *.cpp *.hpp *.h)
function(add_common_target TARGET_NAME STATIC_IE)
add_library(${TARGET_NAME} STATIC ${SOURCES})
if(STATIC_IE)
set(exclude_from_all EXCLUDE_FROM_ALL)
endif()
add_library(${TARGET_NAME} STATIC ${exclude_from_all} ${SOURCES})
ie_faster_build(${TARGET_NAME}
UNITY

View File

@ -5,7 +5,11 @@
file(GLOB_RECURSE SOURCES *.cpp *.hpp *.h *.inc)
function(add_graph_transformer_target TARGET_NAME STATIC_IE)
add_library(${TARGET_NAME} STATIC ${SOURCES})
if(STATIC_IE)
set(exclude_from_all EXCLUDE_FROM_ALL)
endif()
add_library(${TARGET_NAME} STATIC ${exclude_from_all} ${SOURCES})
set_ie_threading_interface_for(${TARGET_NAME})

View File

@ -4,13 +4,6 @@
set(TARGET_NAME funcSharedTests)
list(APPEND EXPORT_DEPENDENCIES
funcTestUtils
ngraphFunctions
lptNgraphFunctions
sharedTestClasses
)
set(PUBLIC_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
addIeTarget(
@ -28,7 +21,10 @@ addIeTarget(
LINK_LIBRARIES
PUBLIC
pugixml::static
${EXPORT_DEPENDENCIES}
funcTestUtils
ngraphFunctions
lptNgraphFunctions
sharedTestClasses
PRIVATE
inference_engine_transformations
DEPENDENCIES
@ -36,8 +32,6 @@ addIeTarget(
mock_engine
HeteroPlugin
MultiDevicePlugin
EXPORT_DEPENDENCIES
${EXPORT_DEPENDENCIES}
)
# CVS-55376

View File

@ -4,11 +4,6 @@
set(TARGET_NAME sharedTestClasses)
list(APPEND EXPORT_DEPENDENCIES
funcTestUtils
ngraphFunctions
)
addIeTarget(
NAME ${TARGET_NAME}
TYPE STATIC
@ -24,9 +19,8 @@ addIeTarget(
LINK_LIBRARIES
PRIVATE
pugixml::static
${EXPORT_DEPENDENCIES}
EXPORT_DEPENDENCIES
${EXPORT_DEPENDENCIES}
funcTestUtils
ngraphFunctions
)
# CVS-55373

View File

@ -3,8 +3,6 @@
#
function(add_common_utils ADD_TARGET_NAME)
list(APPEND EXPORT_DEPENDENCIES gtest gtest_main)
# create target
addIeTarget(
NAME ${ADD_TARGET_NAME}
@ -15,12 +13,11 @@ function(add_common_utils ADD_TARGET_NAME)
ADD_CPPLINT
DEVELOPER_PACKAGE
inference_engine_tests
EXPORT_DEPENDENCIES
${EXPORT_DEPENDENCIES}
LINK_LIBRARIES
PUBLIC
ngraph
${EXPORT_DEPENDENCIES}
gtest
gtest_main
inference_engine_transformations
)

View File

@ -4,10 +4,6 @@
set(TARGET_NAME funcTestUtils)
list(APPEND EXPORT_DEPENDENCIES
commonTestUtils
)
addIeTarget(
NAME ${TARGET_NAME}
TYPE STATIC
@ -22,7 +18,7 @@ addIeTarget(
${CMAKE_CURRENT_SOURCE_DIR}/src
LINK_LIBRARIES
PUBLIC
${EXPORT_DEPENDENCIES}
commonTestUtils
inference_engine_transformations
inference_engine_lp_transformations
inference_engine
@ -32,8 +28,6 @@ addIeTarget(
INCLUDES
PUBLIC
$<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>
EXPORT_DEPENDENCIES
${EXPORT_DEPENDENCIES}
)
ie_faster_build(${TARGET_NAME}

View File

@ -6,11 +6,6 @@ set(TARGET_NAME unitTestUtils)
add_subdirectory(mocks/mock_engine)
list(APPEND EXPORT_DEPENDENCIES
commonTestUtils_s
inference_engine_s
gmock)
addIeTarget(
NAME ${TARGET_NAME}
TYPE STATIC
@ -18,13 +13,12 @@ addIeTarget(
ADD_CPPLINT
DEVELOPER_PACKAGE
inference_engine_tests
LINK_LIBRARIES
PUBLIC
commonTestUtils_s
inference_engine_s
gmock
INCLUDES
PRIVATE
$<TARGET_PROPERTY:inference_engine_legacy,INTERFACE_INCLUDE_DIRECTORIES>
EXPORT_DEPENDENCIES
${EXPORT_DEPENDENCIES}
)
target_link_libraries(${TARGET_NAME}
PUBLIC
${EXPORT_DEPENDENCIES})

View File

@ -4,10 +4,6 @@
set(TARGET_NAME lptNgraphFunctions)
list(APPEND EXPORT_DEPENDENCIES
ngraphFunctions
)
set(PUBLIC_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
addIeTarget(
@ -21,7 +17,7 @@ addIeTarget(
${CMAKE_CURRENT_SOURCE_DIR}/src
LINK_LIBRARIES
PRIVATE
${EXPORT_DEPENDENCIES}
ngraphFunctions
inference_engine_lp_transformations
inference_engine_legacy
ADD_CPPLINT
@ -29,8 +25,6 @@ addIeTarget(
ngraphFunctions
DEVELOPER_PACKAGE
inference_engine_tests
EXPORT_DEPENDENCIES
${EXPORT_DEPENDENCIES}
)
ie_faster_build(${TARGET_NAME}

View File

@ -4,11 +4,6 @@
set(TARGET_NAME ngraphFunctions)
list(APPEND EXPORT_DEPENDENCIES
ngraph_backend
interpreter_backend
)
set(PUBLIC_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
addIeTarget(
@ -23,7 +18,6 @@ addIeTarget(
LINK_LIBRARIES
PUBLIC
ngraph
# ngraph_backend
interpreter_backend
ADD_CPPLINT
DEVELOPER_PACKAGE

View File

@ -22,7 +22,6 @@ addIeTargetTest(
unitTestUtils
mvnc
ngraph
ngraph_backend
interpreter_backend
inference_engine_lp_transformations # for ngraphFunctions
ADD_CPPLINT

View File

@ -107,6 +107,9 @@ function(add_gtest_libraries)
endif()
set_target_properties(gtest gtest_main gmock gmock_main
PROPERTIES FOLDER thirdparty)
openvino_developer_export_targets(COMPONENT inference_engine_tests
TARGETS gmock gmock_main gtest gtest_main)
endfunction()
if(NGRAPH_UNIT_TEST_ENABLE OR ENABLE_TESTS)