20201217-dldt-disable-unused-targets.patch 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
  2. index a3e4f74c..190305a6 100644
  3. --- a/inference-engine/CMakeLists.txt
  4. +++ b/inference-engine/CMakeLists.txt
  5. @@ -69,7 +69,7 @@ if(ENABLE_TESTS)
  6. add_subdirectory(tests)
  7. endif()
  8. -add_subdirectory(tools)
  9. +#add_subdirectory(tools)
  10. function(ie_build_samples)
  11. # samples should be build with the same flags as from OpenVINO package,
  12. @@ -88,7 +88,7 @@ endfunction()
  13. # gflags and format_reader targets are kept inside of samples directory and
  14. # they must be built even if samples build is disabled (required for tests and tools).
  15. -ie_build_samples()
  16. +#ie_build_samples()
  17. file(GLOB_RECURSE SAMPLES_SOURCES samples/*.cpp samples/*.hpp samples/*.h)
  18. add_cpplint_target(sample_cpplint
  19. @@ -179,7 +179,7 @@ endif()
  20. # Developer package
  21. #
  22. -ie_developer_export_targets(format_reader)
  23. +#ie_developer_export_targets(format_reader)
  24. ie_developer_export_targets(${NGRAPH_LIBRARIES})
  25. # for Template plugin
  26. @@ -187,7 +187,7 @@ if(NGRAPH_INTERPRETER_ENABLE)
  27. ie_developer_export_targets(ngraph_backend interpreter_backend)
  28. endif()
  29. -ie_developer_export()
  30. +#ie_developer_export()
  31. configure_file(
  32. "${IE_MAIN_SOURCE_DIR}/cmake/developer_package_config.cmake.in"
  33. diff --git a/inference-engine/cmake/add_ie_target.cmake b/inference-engine/cmake/add_ie_target.cmake
  34. index 35b96542..48dacfb3 100644
  35. --- a/inference-engine/cmake/add_ie_target.cmake
  36. +++ b/inference-engine/cmake/add_ie_target.cmake
  37. @@ -91,7 +91,7 @@ function(addIeTarget)
  38. if (ARG_TYPE STREQUAL EXECUTABLE)
  39. add_executable(${ARG_NAME} ${all_sources})
  40. elseif(ARG_TYPE STREQUAL STATIC OR ARG_TYPE STREQUAL SHARED)
  41. - add_library(${ARG_NAME} ${ARG_TYPE} ${all_sources})
  42. + add_library(${ARG_NAME} ${ARG_TYPE} EXCLUDE_FROM_ALL ${all_sources})
  43. else()
  44. message(SEND_ERROR "Invalid target type ${ARG_TYPE} specified for target name ${ARG_NAME}")
  45. endif()
  46. diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
  47. index f012a038..5204fb6a 100644
  48. --- a/inference-engine/src/inference_engine/CMakeLists.txt
  49. +++ b/inference-engine/src/inference_engine/CMakeLists.txt
  50. @@ -99,7 +99,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. @@ -162,7 +162,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 fab2f68d..864953a1 100644
  66. --- a/inference-engine/src/legacy_api/CMakeLists.txt
  67. +++ b/inference-engine/src/legacy_api/CMakeLists.txt
  68. @@ -22,7 +22,7 @@ endif()
  69. # Create object library
  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 f52926d6..dd039e29 100644
  76. --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  77. +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  78. @@ -194,7 +194,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_include_directories(${TARGET_NAME}_obj PRIVATE $<TARGET_PROPERTY:inference_engine_preproc_s,INTERFACE_INCLUDE_DIRECTORIES>
  83. $<TARGET_PROPERTY:inference_engine_legacy,INTERFACE_INCLUDE_DIRECTORIES>
  84. diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt
  85. index d47dfb35..a9046654 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 bd97c2c6..d89cdaa5 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 797ef975..0cc5a65a 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/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
  138. index fa2a4d02..c2ca41cd 100644
  139. --- a/inference-engine/thirdparty/CMakeLists.txt
  140. +++ b/inference-engine/thirdparty/CMakeLists.txt
  141. @@ -61,11 +61,11 @@ else()
  142. target_include_directories(pugixml INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml/src>")
  143. endif()
  144. -add_subdirectory(stb_lib)
  145. +#add_subdirectory(stb_lib)
  146. add_subdirectory(ade)
  147. add_subdirectory(fluid/modules/gapi)
  148. -set_target_properties(ade fluid stb_image PROPERTIES FOLDER thirdparty)
  149. +set_target_properties(ade fluid PROPERTIES FOLDER thirdparty)
  150. # developer package
  151. diff --git a/inference-engine/thirdparty/mkldnn.cmake b/inference-engine/thirdparty/mkldnn.cmake
  152. index 0c2e936e..f36e7beb 100644
  153. --- a/inference-engine/thirdparty/mkldnn.cmake
  154. +++ b/inference-engine/thirdparty/mkldnn.cmake
  155. @@ -117,7 +117,7 @@ if(WIN32)
  156. endif()
  157. endif()
  158. -add_library(${TARGET} STATIC ${HDR} ${SRC})
  159. +add_library(${TARGET} STATIC EXCLUDE_FROM_ALL ${HDR} ${SRC})
  160. set_ie_threading_interface_for(${TARGET})
  161. if(GEMM STREQUAL "OPENBLAS")
  162. diff --git a/inference-engine/thirdparty/pugixml/CMakeLists.txt b/inference-engine/thirdparty/pugixml/CMakeLists.txt
  163. index 8bcb2801..380fb468 100644
  164. --- a/inference-engine/thirdparty/pugixml/CMakeLists.txt
  165. +++ b/inference-engine/thirdparty/pugixml/CMakeLists.txt
  166. @@ -41,7 +41,7 @@ if(BUILD_SHARED_LIBS)
  167. else()
  168. add_library(pugixml STATIC ${SOURCES})
  169. if (MSVC)
  170. - add_library(pugixml_mt STATIC ${SOURCES})
  171. + #add_library(pugixml_mt STATIC ${SOURCES})
  172. #if (WIN32)
  173. # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
  174. # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
  175. diff --git a/ngraph/core/builder/CMakeLists.txt b/ngraph/core/builder/CMakeLists.txt
  176. index 4c5a4766..6f5f2535 100644
  177. --- a/ngraph/core/builder/CMakeLists.txt
  178. +++ b/ngraph/core/builder/CMakeLists.txt
  179. @@ -28,7 +28,7 @@ source_group("src" FILES ${LIBRARY_SRC})
  180. source_group("include" FILES ${PUBLIC_HEADERS})
  181. # Create shared library
  182. -add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  183. +add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  184. if(COMMAND ie_faster_build)
  185. ie_faster_build(${TARGET_NAME}
  186. diff --git a/ngraph/core/reference/CMakeLists.txt b/ngraph/core/reference/CMakeLists.txt
  187. index 2fa49195..ce68fdc8 100644
  188. --- a/ngraph/core/reference/CMakeLists.txt
  189. +++ b/ngraph/core/reference/CMakeLists.txt
  190. @@ -28,7 +28,7 @@ source_group("src" FILES ${LIBRARY_SRC})
  191. source_group("include" FILES ${PUBLIC_HEADERS})
  192. # Create shared library
  193. -add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  194. +add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${LIBRARY_SRC} ${PUBLIC_HEADERS})
  195. if(COMMAND ie_faster_build)
  196. ie_faster_build(${TARGET_NAME}
  197. diff --git a/openvino/itt/CMakeLists.txt b/openvino/itt/CMakeLists.txt
  198. index 766521a1..04240a89 100644
  199. --- a/openvino/itt/CMakeLists.txt
  200. +++ b/openvino/itt/CMakeLists.txt
  201. @@ -56,7 +56,7 @@ if(ENABLE_PROFILING_ITT)
  202. endif()
  203. endif()
  204. -add_library(${TARGET_NAME} STATIC ${SOURCES})
  205. +add_library(${TARGET_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES})
  206. add_library(openvino::itt ALIAS ${TARGET_NAME})