Enabled plugins auto registration (#12573)

* Enabled plugins auto registration

* Fixed comments

* Skip CMakeLists.txt
This commit is contained in:
Ilya Churaev 2022-08-16 23:19:10 +04:00 committed by GitHub
parent 687f8ae655
commit 9e7c821477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 35 deletions

View File

@ -94,13 +94,6 @@ function(register_extra_modules)
generate_fake_dev_package("openvino")
generate_fake_dev_package("IE")
# automatically import plugins from the 'runtime/plugins' folder
file(GLOB local_extra_modules "runtime/plugins/*")
# add template plugin
if(ENABLE_TEMPLATE)
list(APPEND local_extra_modules "${OpenVINO_SOURCE_DIR}/docs/template_plugin")
endif()
# detect where IE_EXTRA_MODULES contains folders with CMakeLists.txt
# other folders are supposed to have sub-folders with CMakeLists.txt
foreach(module_path IN LISTS IE_EXTRA_MODULES)
@ -111,8 +104,13 @@ function(register_extra_modules)
endif()
endforeach()
# add template plugin
if(ENABLE_TEMPLATE)
list(APPEND extra_modules "${OpenVINO_SOURCE_DIR}/docs/template_plugin")
endif()
# add each extra module
foreach(module_path IN LISTS extra_modules local_extra_modules)
foreach(module_path IN LISTS extra_modules)
if(module_path)
get_filename_component(module_name "${module_path}" NAME)
set(build_module ON)

View File

@ -2,30 +2,10 @@
# SPDX-License-Identifier: Apache-2.0
#
if(ENABLE_HETERO)
add_subdirectory(hetero)
endif()
if(ENABLE_INTEL_CPU)
add_subdirectory(intel_cpu)
endif()
if(ENABLE_INTEL_GPU)
add_subdirectory(intel_gpu)
endif()
if(ENABLE_INTEL_GNA)
add_subdirectory(intel_gna)
endif()
if(ENABLE_INTEL_MYRIAD_COMMON)
add_subdirectory(intel_myriad)
endif()
if(ENABLE_AUTO OR ENABLE_MULTI)
add_subdirectory(auto)
endif()
if(ENABLE_AUTO_BATCH)
add_subdirectory(auto_batch)
endif()
file(GLOB local_modules "${CMAKE_CURRENT_SOURCE_DIR}/*")
foreach(module_path IN LISTS local_modules)
if(NOT IS_DIRECTORY ${module_path}) # Skip files
continue()
endif()
add_subdirectory(${module_path})
endforeach()

View File

@ -1,6 +1,9 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT ENABLE_AUTO AND NOT ENABLE_MULTI)
return()
endif()
set (TARGET_NAME "openvino_auto_plugin")

View File

@ -2,6 +2,10 @@
# SPDX-License-Identifier: Apache-2.0
#
if (NOT ENABLE_AUTO_BATCH)
return()
endif()
set(TARGET_NAME "openvino_auto_batch_plugin")
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

View File

@ -2,6 +2,10 @@
# SPDX-License-Identifier: Apache-2.0
#
if (NOT ENABLE_HETERO)
return()
endif()
set (TARGET_NAME "openvino_hetero_plugin")
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

View File

@ -2,6 +2,10 @@
# SPDX-License-Identifier: Apache-2.0
#
if (NOT ENABLE_INTEL_CPU)
return()
endif()
set(TARGET_NAME "openvino_intel_cpu_plugin")
if(CMAKE_COMPILER_IS_GNUCC)

View File

@ -2,6 +2,10 @@
# SPDX-License-Identifier: Apache-2.0
#
if (NOT ENABLE_INTEL_GNA)
return()
endif()
set(TARGET_NAME "openvino_intel_gna_plugin")
if(CMAKE_COMPILER_IS_GNUCC)

View File

@ -2,6 +2,10 @@
# SPDX-License-Identifier: Apache-2.0
#
if (NOT ENABLE_INTEL_GPU)
return()
endif()
set (TARGET_NAME "openvino_intel_gpu_plugin")
if(CMAKE_COMPILER_IS_GNUCXX)

View File

@ -6,6 +6,10 @@
# Build common part
#
if (NOT ENABLE_INTEL_MYRIAD_COMMON)
return()
endif()
if(CMAKE_COMPILER_IS_GNUCC)
ie_add_compiler_flags(-Wno-all)
endif()