20200413-dldt-disable-unused-targets.patch 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
  2. index e7ea6547..7333d19c 100644
  3. --- a/inference-engine/CMakeLists.txt
  4. +++ b/inference-engine/CMakeLists.txt
  5. @@ -72,11 +72,11 @@ if(ENABLE_TESTS)
  6. add_subdirectory(tests)
  7. endif()
  8. -add_subdirectory(tools)
  9. +#add_subdirectory(tools)
  10. # gflags and format_reader targets are kept inside of samples directory and
  11. # they must be built even if samples build is disabled (required for tests and tools).
  12. -add_subdirectory(samples)
  13. +#add_subdirectory(samples)
  14. file(GLOB_RECURSE SAMPLES_SOURCES samples/*.cpp samples/*.hpp samples/*.h)
  15. add_cpplint_target(sample_cpplint
  16. @@ -154,10 +154,10 @@ endif()
  17. # Developer package
  18. #
  19. -ie_developer_export_targets(format_reader)
  20. +#ie_developer_export_targets(format_reader)
  21. ie_developer_export_targets(${NGRAPH_LIBRARIES})
  22. -ie_developer_export()
  23. +#ie_developer_export()
  24. configure_file(
  25. "${IE_MAIN_SOURCE_DIR}/cmake/developer_package_config.cmake.in"
  26. diff --git a/inference-engine/src/legacy_api/CMakeLists.txt b/inference-engine/src/legacy_api/CMakeLists.txt
  27. index a03a5f23..63d4f687 100644
  28. --- a/inference-engine/src/legacy_api/CMakeLists.txt
  29. +++ b/inference-engine/src/legacy_api/CMakeLists.txt
  30. @@ -22,7 +22,7 @@ source_group("include" FILES ${PUBLIC_HEADERS})
  31. # Create object library
  32. -add_library(${TARGET_NAME}_obj OBJECT
  33. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
  34. ${LIBRARY_SRC}
  35. ${NN_BUILDER_LIBRARY_SRC}
  36. ${PUBLIC_HEADERS})
  37. diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
  38. index 2071c126..015d8ff8 100644
  39. --- a/inference-engine/src/inference_engine/CMakeLists.txt
  40. +++ b/inference-engine/src/inference_engine/CMakeLists.txt
  41. @@ -98,7 +98,7 @@ add_clang_format_target(${TARGET_NAME}_plugin_api_clang_format FOR_SOURCES ${plu
  42. # Create common base object library
  43. -add_library(${TARGET_NAME}_common_obj OBJECT
  44. +add_library(${TARGET_NAME}_common_obj OBJECT EXCLUDE_FROM_ALL
  45. ${IE_BASE_SOURCE_FILES})
  46. target_compile_definitions(${TARGET_NAME}_common_obj PRIVATE IMPLEMENT_INFERENCE_ENGINE_API)
  47. @@ -110,7 +110,7 @@ target_include_directories(${TARGET_NAME}_common_obj SYSTEM PRIVATE
  48. # Create object library
  49. -add_library(${TARGET_NAME}_obj OBJECT
  50. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
  51. ${LIBRARY_SRC}
  52. ${LIBRARY_HEADERS}
  53. ${PUBLIC_HEADERS})
  54. @@ -200,7 +200,7 @@ add_clang_format_target(${TARGET_NAME}_nn_builder_clang_format FOR_TARGETS ${TAR
  55. # Static library used for unit tests which are always built
  56. -add_library(${TARGET_NAME}_s STATIC
  57. +add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
  58. $<TARGET_OBJECTS:${TARGET_NAME}_obj>
  59. $<TARGET_OBJECTS:${TARGET_NAME}_common_obj>
  60. $<TARGET_OBJECTS:${TARGET_NAME}_legacy_obj>
  61. diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  62. index 52183e86..4fd6d7d4 100644
  63. --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  64. +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
  65. @@ -163,9 +163,9 @@ add_library(mkldnn_plugin_layers_no_opt OBJECT ${CROSS_COMPILED_SOURCES})
  66. set_ie_threading_interface_for(mkldnn_plugin_layers_no_opt)
  67. target_compile_definitions(mkldnn_plugin_layers_no_opt PRIVATE "IMPLEMENT_INFERENCE_ENGINE_PLUGIN")
  68. -add_library(mkldnn_plugin_layers_no_opt_s OBJECT ${CROSS_COMPILED_SOURCES})
  69. -set_ie_threading_interface_for(mkldnn_plugin_layers_no_opt_s)
  70. -target_compile_definitions(mkldnn_plugin_layers_no_opt_s PRIVATE "USE_STATIC_IE;IMPLEMENT_INFERENCE_ENGINE_PLUGIN")
  71. +#add_library(mkldnn_plugin_layers_no_opt_s OBJECT ${CROSS_COMPILED_SOURCES})
  72. +#set_ie_threading_interface_for(mkldnn_plugin_layers_no_opt_s)
  73. +#target_compile_definitions(mkldnn_plugin_layers_no_opt_s PRIVATE "USE_STATIC_IE;IMPLEMENT_INFERENCE_ENGINE_PLUGIN")
  74. set(object_libraries mkldnn_plugin_layers_no_opt)
  75. set(mkldnn_plugin_object_libraries mkldnn_plugin_layers_no_opt_s)
  76. @@ -190,7 +190,7 @@ if (ENABLE_SSE42)
  77. endfunction()
  78. mkldnn_create_sse42_layers(mkldnn_plugin_layers_sse42)
  79. - mkldnn_create_sse42_layers(mkldnn_plugin_layers_sse42_s)
  80. + #mkldnn_create_sse42_layers(mkldnn_plugin_layers_sse42_s)
  81. list(APPEND object_libraries mkldnn_plugin_layers_sse42)
  82. list(APPEND mkldnn_plugin_object_libraries mkldnn_plugin_layers_sse42_s)
  83. @@ -216,7 +216,7 @@ if (ENABLE_AVX2)
  84. endfunction()
  85. mkldnn_create_avx2_layers(mkldnn_plugin_layers_avx2)
  86. - mkldnn_create_avx2_layers(mkldnn_plugin_layers_avx2_s)
  87. + #mkldnn_create_avx2_layers(mkldnn_plugin_layers_avx2_s)
  88. list(APPEND object_libraries mkldnn_plugin_layers_avx2)
  89. list(APPEND mkldnn_plugin_object_libraries mkldnn_plugin_layers_avx2_s)
  90. @@ -242,7 +242,7 @@ if (ENABLE_AVX512F)
  91. endfunction()
  92. mkldnn_create_avx512f_layers(mkldnn_plugin_layers_avx512)
  93. - mkldnn_create_avx512f_layers(mkldnn_plugin_layers_avx512_s)
  94. + #mkldnn_create_avx512f_layers(mkldnn_plugin_layers_avx512_s)
  95. list(APPEND object_libraries mkldnn_plugin_layers_avx512)
  96. list(APPEND mkldnn_plugin_object_libraries mkldnn_plugin_layers_avx512_s)
  97. @@ -264,7 +264,7 @@ target_link_libraries(${TARGET_NAME} PRIVATE inference_engine inference_engine_l
  98. # add test object library
  99. -add_library(${TARGET_NAME}_obj OBJECT ${SOURCES} ${HEADERS})
  100. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL ${SOURCES} ${HEADERS})
  101. target_include_directories(${TARGET_NAME}_obj PRIVATE $<TARGET_PROPERTY:inference_engine_preproc_s,INTERFACE_INCLUDE_DIRECTORIES>
  102. $<TARGET_PROPERTY:inference_engine_lp_transformations,INTERFACE_INCLUDE_DIRECTORIES>
  103. diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt
  104. index c3ad1e58..b5913840 100644
  105. --- a/inference-engine/src/preprocessing/CMakeLists.txt
  106. +++ b/inference-engine/src/preprocessing/CMakeLists.txt
  107. @@ -124,7 +124,7 @@ endif()
  108. # Create object library
  109. -add_library(${TARGET_NAME}_obj OBJECT
  110. +add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
  111. ${LIBRARY_SRC}
  112. ${LIBRARY_HEADERS})
  113. @@ -167,7 +167,7 @@ endif()
  114. # Static library used for unit tests which are always built
  115. -add_library(${TARGET_NAME}_s STATIC
  116. +add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
  117. $<TARGET_OBJECTS:${TARGET_NAME}_obj>)
  118. set_ie_threading_interface_for(${TARGET_NAME}_s)
  119. diff --git a/inference-engine/src/vpu/common/CMakeLists.txt b/inference-engine/src/vpu/common/CMakeLists.txt
  120. index 65215299..03ba4a4c 100644
  121. --- a/inference-engine/src/vpu/common/CMakeLists.txt
  122. +++ b/inference-engine/src/vpu/common/CMakeLists.txt
  123. @@ -53,7 +53,7 @@ add_common_target("vpu_common_lib" FALSE)
  124. # Unit tests support for graph transformer
  125. if(WIN32)
  126. - add_common_target("vpu_common_lib_test_static" TRUE)
  127. + #add_common_target("vpu_common_lib_test_static" TRUE)
  128. else()
  129. add_library("vpu_common_lib_test_static" ALIAS "vpu_common_lib")
  130. endif()
  131. diff --git a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
  132. index 982d3c7f..15fcf3e8 100644
  133. --- a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
  134. +++ b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
  135. @@ -64,7 +64,7 @@ add_graph_transformer_target("vpu_graph_transformer" FALSE)
  136. # Unit tests support for graph transformer
  137. if(WIN32)
  138. - add_graph_transformer_target("vpu_graph_transformer_test_static" TRUE)
  139. + #add_graph_transformer_target("vpu_graph_transformer_test_static" TRUE)
  140. else()
  141. add_library("vpu_graph_transformer_test_static" ALIAS "vpu_graph_transformer")
  142. endif()
  143. diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
  144. index ebf32c71..ad8cb435 100644
  145. --- a/inference-engine/thirdparty/CMakeLists.txt
  146. +++ b/inference-engine/thirdparty/CMakeLists.txt
  147. @@ -36,7 +36,7 @@ function(build_with_lto)
  148. endif()
  149. add_subdirectory(pugixml)
  150. - add_subdirectory(stb_lib)
  151. + #add_subdirectory(stb_lib)
  152. add_subdirectory(ade)
  153. add_subdirectory(fluid/modules/gapi)
  154. diff --git a/inference-engine/thirdparty/pugixml/CMakeLists.txt b/inference-engine/thirdparty/pugixml/CMakeLists.txt
  155. index 8bcb2801..f7e031c0 100644
  156. --- a/inference-engine/thirdparty/pugixml/CMakeLists.txt
  157. +++ b/inference-engine/thirdparty/pugixml/CMakeLists.txt
  158. @@ -41,7 +41,7 @@ if(BUILD_SHARED_LIBS)
  159. else()
  160. add_library(pugixml STATIC ${SOURCES})
  161. if (MSVC)
  162. - add_library(pugixml_mt STATIC ${SOURCES})
  163. + #add_library(pugixml_mt STATIC ${SOURCES})
  164. #if (WIN32)
  165. # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
  166. # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")