Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[IR FE] Remove globing from IR frontend and tests (#38251)

Pawel Raasz8070a68ef0af
diff --git a/src/frontends/ir/CMakeLists.txt b/src/frontends/ir/CMakeLists.txt
index f919814e76c..75fb73087c2 100644
--- a/src/frontends/ir/CMakeLists.txt
+++ b/src/frontends/ir/CMakeLists.txt
@@ -2,7 +2,24 @@
# SPDX-License-Identifier: Apache-2.0
#
-add_subdirectory(src)
+ov_add_frontend(NAME ir
+ FILEDESCRIPTION "FrontEnd to load OpenVINO IR file format"
+ LINK_LIBRARIES
+ openvino::pugixml
+ openvino::core::dev
+ openvino::xml_util
+ SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/frontend.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/input_model.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/utils.cpp
+ HEADERS
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/input_model.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/utils.hpp
+ PUBLIC_HEADERS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/openvino/frontend/ir/frontend.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/openvino/frontend/ir/visibility.hpp)
+
+ov_build_target_faster(openvino_ir_frontend PCH)
if(ENABLE_TESTS)
add_subdirectory(tests)
diff --git a/src/frontends/ir/src/CMakeLists.txt b/src/frontends/ir/src/CMakeLists.txt
deleted file mode 100644
index 412163209a7..00000000000
--- a/src/frontends/ir/src/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2018-2026 Intel Corporation
-# SPDX-License-Identifier: Apache-2.0
-#
-
-ov_add_frontend(NAME ir
- FILEDESCRIPTION "FrontEnd to load OpenVINO IR file format"
- LINK_LIBRARIES openvino::pugixml
- openvino::core::dev
- openvino::xml_util)
-
-ov_build_target_faster(openvino_ir_frontend PCH)
diff --git a/src/frontends/ir/tests/CMakeLists.txt b/src/frontends/ir/tests/CMakeLists.txt
index 16215017743..b3979c32de8 100644
--- a/src/frontends/ir/tests/CMakeLists.txt
+++ b/src/frontends/ir/tests/CMakeLists.txt
@@ -6,7 +6,18 @@ set(TARGET_NAME ov_ir_frontend_tests)
ov_add_test_target(
NAME ${TARGET_NAME}
- ROOT ${CMAKE_CURRENT_SOURCE_DIR}
+ SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/frontend_test.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/frontend_test_basic.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/frontend_test_mmap.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/frontend_test_with_extensions.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/meta_data_tests.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/partial_shape_deserialization.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/pre_processing_deserialization.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/rt_info_custom.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/rt_info_deserialization.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/tensor_iterator_deserialization.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/threading_tests.cpp
DEPENDENCIES
openvino_ir_frontend
LINK_LIBRARIES
@@ -18,6 +29,7 @@ ov_add_test_target(
INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/../include"
ADD_CLANG_FORMAT
+ CHECK_SOURCES_LISTED
LABELS
OV UNIT IR_FE
)