20210324-dldt-disable-unused-targets.patch 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. diff --git a/cmake/developer_package/add_ie_target.cmake b/cmake/developer_package/add_ie_target.cmake
  2. index b081a6945..5468f09f0 100644
  3. --- a/cmake/developer_package/add_ie_target.cmake
  4. +++ b/cmake/developer_package/add_ie_target.cmake
  5. @@ -91,7 +91,7 @@ function(addIeTarget)
  6. if (ARG_TYPE STREQUAL EXECUTABLE)
  7. add_executable(${ARG_NAME} ${all_sources})
  8. elseif(ARG_TYPE STREQUAL STATIC OR ARG_TYPE STREQUAL SHARED)
  9. - add_library(${ARG_NAME} ${ARG_TYPE} ${all_sources})
  10. + add_library(${ARG_NAME} ${ARG_TYPE} EXCLUDE_FROM_ALL ${all_sources})
  11. else()
  12. message(SEND_ERROR "Invalid target type ${ARG_TYPE} specified for target name ${ARG_NAME}")
  13. endif()
  14. diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
  15. index 95c657222..3ab53f854 100644
  16. --- a/inference-engine/CMakeLists.txt
  17. +++ b/inference-engine/CMakeLists.txt
  18. @@ -39,7 +39,7 @@ if(ENABLE_TESTS)
  19. add_subdirectory(tests)
  20. endif()
  21. -add_subdirectory(tools)
  22. +#add_subdirectory(tools)
  23. function(ie_build_samples)
  24. # samples should be build with the same flags as from OpenVINO package,
  25. @@ -58,7 +58,7 @@ endfunction()
  26. # gflags and format_reader targets are kept inside of samples directory and
  27. # they must be built even if samples build is disabled (required for tests and tools).
  28. -ie_build_samples()
  29. +#ie_build_samples()
  30. if (ENABLE_PYTHON)
  31. add_subdirectory(ie_bridges/python)
  32. @@ -138,7 +138,7 @@ endif()
  33. # Developer package
  34. #
  35. -openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader)
  36. +#openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader)
  37. openvino_developer_export_targets(COMPONENT ngraph TARGETS ${NGRAPH_LIBRARIES})
  38. # for Template plugin
  39. @@ -146,7 +146,7 @@ if(NGRAPH_INTERPRETER_ENABLE)
  40. openvino_developer_export_targets(COMPONENT ngraph TARGETS ngraph_backend interpreter_backend)
  41. endif()
  42. -ie_developer_export()
  43. +#ie_developer_export()
  44. configure_file(
  45. "${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in"
  46. diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
  47. index 1ea322763..b5c25837d 100644
  48. --- a/inference-engine/src/inference_engine/CMakeLists.txt
  49. +++ b/inference-engine/src/inference_engine/CMakeLists.txt
  50. @@ -95,7 +95,7 @@ add_cpplint_target(${TARGET_NAME}_plugin_api_cpplint FOR_SOURCES ${plugin_api_sr
  51. # Create object library
  52. -add_library(${TARGET_NAME}_obj OBJECT
  53. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
  54. ${LIBRARY_SRC}
  55. ${LIBRARY_HEADERS}
  56. ${PUBLIC_HEADERS})
  57. @@ -156,7 +156,7 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
  58. # Static library used for unit tests which are always built
  59. -add_library(${TARGET_NAME}_s STATIC
  60. +add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
  61. $<TARGET_OBJECTS:${TARGET_NAME}_legacy_obj>
  62. $<TARGET_OBJECTS:${TARGET_NAME}_obj>
  63. ${IE_STATIC_DEPENDENT_FILES})
  64. diff --git a/inference-engine/src/legacy_api/CMakeLists.txt b/inference-engine/src/legacy_api/CMakeLists.txt
  65. index 66498fdbd..4a6c7f619 100644
  66. --- a/inference-engine/src/legacy_api/CMakeLists.txt
  67. +++ b/inference-engine/src/legacy_api/CMakeLists.txt
  68. @@ -26,7 +26,7 @@ endif()
  69. file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp)
  70. -add_library(${TARGET_NAME}_obj OBJECT
  71. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
  72. ${LIBRARY_SRC}
  73. ${PUBLIC_HEADERS})
  74. diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  75. index 73c7ba9f9..e8cf8d9f9 100644
  76. --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  77. +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  78. @@ -78,7 +78,7 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
  79. # add test object library
  80. -add_library(${TARGET_NAME}_obj OBJECT ${SOURCES} ${HEADERS})
  81. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL ${SOURCES} ${HEADERS})
  82. target_link_libraries(${TARGET_NAME}_obj PUBLIC mkldnn)
  83. target_include_directories(${TARGET_NAME}_obj PRIVATE $<TARGET_PROPERTY:inference_engine_preproc_s,INTERFACE_INCLUDE_DIRECTORIES>
  84. diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt
  85. index 973fafcbf..d886d6aa4 100644
  86. --- a/inference-engine/src/preprocessing/CMakeLists.txt
  87. +++ b/inference-engine/src/preprocessing/CMakeLists.txt
  88. @@ -101,7 +101,7 @@ endif()
  89. # Create object library
  90. -add_library(${TARGET_NAME}_obj OBJECT
  91. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
  92. ${LIBRARY_SRC}
  93. ${LIBRARY_HEADERS})
  94. @@ -153,7 +153,7 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
  95. # Static library used for unit tests which are always built
  96. -add_library(${TARGET_NAME}_s STATIC
  97. +add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
  98. $<TARGET_OBJECTS:${TARGET_NAME}_obj>)
  99. set_ie_threading_interface_for(${TARGET_NAME}_s)
  100. diff --git a/inference-engine/src/vpu/common/CMakeLists.txt b/inference-engine/src/vpu/common/CMakeLists.txt
  101. index 5c31c9a7a..adb170a5f 100644
  102. --- a/inference-engine/src/vpu/common/CMakeLists.txt
  103. +++ b/inference-engine/src/vpu/common/CMakeLists.txt
  104. @@ -5,7 +5,7 @@
  105. file(GLOB_RECURSE SOURCES *.cpp *.hpp *.h)
  106. function(add_common_target TARGET_NAME STATIC_IE)
  107. - add_library(${TARGET_NAME} STATIC ${SOURCES})
  108. + add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES})
  109. ie_faster_build(${TARGET_NAME}
  110. UNITY
  111. @@ -62,7 +62,7 @@ add_common_target("vpu_common_lib" FALSE)
  112. # Unit tests support for graph transformer
  113. if(WIN32)
  114. - add_common_target("vpu_common_lib_test_static" TRUE)
  115. + #add_common_target("vpu_common_lib_test_static" TRUE)
  116. else()
  117. add_library("vpu_common_lib_test_static" ALIAS "vpu_common_lib")
  118. endif()
  119. diff --git a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
  120. index 97bd4caa9..0f49ed144 100644
  121. --- a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
  122. +++ b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
  123. @@ -5,7 +5,7 @@
  124. file(GLOB_RECURSE SOURCES *.cpp *.hpp *.h *.inc)
  125. function(add_graph_transformer_target TARGET_NAME STATIC_IE)
  126. - add_library(${TARGET_NAME} STATIC ${SOURCES})
  127. + add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES})
  128. set_ie_threading_interface_for(${TARGET_NAME})
  129. @@ -63,7 +63,7 @@ add_graph_transformer_target("vpu_graph_transformer" FALSE)
  130. # Unit tests support for graph transformer
  131. if(WIN32)
  132. - add_graph_transformer_target("vpu_graph_transformer_test_static" TRUE)
  133. + #add_graph_transformer_target("vpu_graph_transformer_test_static" TRUE)
  134. else()
  135. add_library("vpu_graph_transformer_test_static" ALIAS "vpu_graph_transformer")
  136. endif()
  137. diff --git a/inference-engine/thirdparty/pugixml/CMakeLists.txt b/inference-engine/thirdparty/pugixml/CMakeLists.txt
  138. index 8bcb2801a..5a17fa3f7 100644
  139. --- a/inference-engine/thirdparty/pugixml/CMakeLists.txt
  140. +++ b/inference-engine/thirdparty/pugixml/CMakeLists.txt
  141. @@ -41,7 +41,7 @@ if(BUILD_SHARED_LIBS)
  142. else()
  143. add_library(pugixml STATIC ${SOURCES})
  144. if (MSVC)
  145. - add_library(pugixml_mt STATIC ${SOURCES})
  146. + #add_library(pugixml_mt STATIC ${SOURCES})
  147. #if (WIN32)
  148. # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
  149. # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
  150. diff --git a/ngraph/core/builder/CMakeLists.txt b/ngraph/core/builder/CMakeLists.txt
  151. index 13b31ee17..be613b65f 100644
  152. --- a/ngraph/core/builder/CMakeLists.txt
  153. +++ b/ngraph/core/builder/CMakeLists.txt
  154. @@ -28,7 +28,7 @@ source_group("src" FILES ${LIBRARY_SRC})
  155. source_group("include" FILES ${PUBLIC_HEADERS})
  156. # Create shared library
  157. -add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  158. +add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  159. if(COMMAND ie_faster_build)
  160. ie_faster_build(${TARGET_NAME}
  161. diff --git a/ngraph/core/reference/CMakeLists.txt b/ngraph/core/reference/CMakeLists.txt
  162. index 62749a650..dc857f853 100644
  163. --- a/ngraph/core/reference/CMakeLists.txt
  164. +++ b/ngraph/core/reference/CMakeLists.txt
  165. @@ -28,7 +28,7 @@ source_group("src" FILES ${LIBRARY_SRC})
  166. source_group("include" FILES ${PUBLIC_HEADERS})
  167. # Create shared library
  168. -add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  169. +add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  170. if(COMMAND ie_faster_build)
  171. ie_faster_build(${TARGET_NAME}
  172. diff --git a/openvino/itt/CMakeLists.txt b/openvino/itt/CMakeLists.txt
  173. index 648ac0a05..4291740d7 100644
  174. --- a/openvino/itt/CMakeLists.txt
  175. +++ b/openvino/itt/CMakeLists.txt
  176. @@ -18,7 +18,7 @@ set(TARGET_NAME itt)
  177. file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.hpp")
  178. -add_library(${TARGET_NAME} STATIC ${SOURCES})
  179. +add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES})
  180. add_library(openvino::itt ALIAS ${TARGET_NAME})