Don't build extra module if it doesn't have cmake files (#3074)
authorIlya Lavrenov <ilya.lavrenov@intel.com>
Wed, 11 Nov 2020 17:31:44 +0000 (20:31 +0300)
committerGitHub <noreply@github.com>
Wed, 11 Nov 2020 17:31:44 +0000 (20:31 +0300)
inference-engine/CMakeLists.txt

index 2e01504..a3e4f74 100644 (file)
@@ -250,8 +250,12 @@ function(register_extra_modules)
     foreach(module_path IN LISTS extra_modules local_extra_modules)
         if(module_path)
             get_filename_component(module_name "${module_path}" NAME)
+            set(build_module ON)
+            if(NOT EXISTS "${module_path}/CMakeLists.txt") # if module is built not using cmake
+                set(build_module OFF)
+            endif()
             if(NOT DEFINED BUILD_${module_name})
-                set(BUILD_${module_name} ON CACHE BOOL "Build ${module_name} extra module" FORCE)
+                set(BUILD_${module_name} ${build_module} CACHE BOOL "Build ${module_name} extra module" FORCE)
             endif()
             if(BUILD_${module_name})
                 message(STATUS "Register ${module_name} to be built in build-modules/${module_name}")