20210630-dldt-disable-unused-targets.patch 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. diff --git a/cmake/developer_package/add_ie_target.cmake b/cmake/developer_package/add_ie_target.cmake
  2. index d49f16a4d..2726ca787 100644
  3. --- a/cmake/developer_package/add_ie_target.cmake
  4. +++ b/cmake/developer_package/add_ie_target.cmake
  5. @@ -92,7 +92,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 1ac7fd8bf..df7091e51 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. @@ -142,7 +142,7 @@ endif()
  33. # Developer package
  34. #
  35. -openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader gflags ie_samples_utils)
  36. +#openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader gflags ie_samples_utils)
  37. # for Template plugin
  38. if(NGRAPH_INTERPRETER_ENABLE)
  39. @@ -166,7 +166,7 @@ function(ie_generate_dev_package_config)
  40. @ONLY)
  41. endfunction()
  42. -ie_generate_dev_package_config()
  43. +#ie_generate_dev_package_config()
  44. #
  45. # Coverage
  46. diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
  47. index e8ed1a5c4..1fc9fc3ff 100644
  48. --- a/inference-engine/src/inference_engine/CMakeLists.txt
  49. +++ b/inference-engine/src/inference_engine/CMakeLists.txt
  50. @@ -110,7 +110,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. @@ -181,7 +181,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 8eae82bd2..e0e6745b1 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 fe57b29dd..07831e2fb 100644
  76. --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  77. +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  78. @@ -67,7 +67,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 f9548339d..ef962145a 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 249e47c28..4ddf63049 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. @@ -60,7 +60,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 bc73ab5b1..b4c1547fc 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. @@ -70,7 +70,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..f7e031c01 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 ff5c381e7..2797ec9ab 100644
  152. --- a/ngraph/core/builder/CMakeLists.txt
  153. +++ b/ngraph/core/builder/CMakeLists.txt
  154. @@ -16,7 +16,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 ef4a764ab..f6d3172e2 100644
  163. --- a/ngraph/core/reference/CMakeLists.txt
  164. +++ b/ngraph/core/reference/CMakeLists.txt
  165. @@ -16,7 +16,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 e9f880b8c..c63f4df63 100644
  174. --- a/openvino/itt/CMakeLists.txt
  175. +++ b/openvino/itt/CMakeLists.txt
  176. @@ -6,7 +6,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})