Skip to content

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

Add precompiled headers to more cmake targets (#30878)

Oleg Pipikin85cd795d62a6
diff --git a/cmake/developer_package/faster_build.cmake b/cmake/developer_package/faster_build.cmake
index 0015c553020..61db001a314 100644
--- a/cmake/developer_package/faster_build.cmake
+++ b/cmake/developer_package/faster_build.cmake
@@ -7,14 +7,24 @@ include(CMakeParseArguments)
function(ov_build_target_faster TARGET_NAME)
# ENABLE_FASTER_BUILD option enables usage of precompiled headers
# ENABLE_UNITY_BUILD option enalbles unity build
- cmake_parse_arguments(FASTER_BUILD "UNITY" "PCH" "PCH_EXCLUDE" ${ARGN})
+ set(options PCH UNITY)
+ set(oneValueArgs PCH_HEADER)
+ set(multiValueArgs PCH_EXCLUDE)
+ cmake_parse_arguments(PARSE_ARGV 0 FASTER_BUILD "${options}" "${oneValueArgs}" "${multiValueArgs}")
if(FASTER_BUILD_UNITY AND ENABLE_UNITY_BUILD)
set_target_properties(${TARGET_NAME} PROPERTIES UNITY_BUILD ON)
endif()
- if(FASTER_BUILD_PCH AND ENABLE_FASTER_BUILD)
- target_precompile_headers(${TARGET_NAME} PRIVATE ${FASTER_BUILD_PCH})
+ if((FASTER_BUILD_PCH OR FASTER_BUILD_PCH_HEADER) AND ENABLE_FASTER_BUILD)
+ if (FASTER_BUILD_PCH_HEADER)
+ target_precompile_headers(${TARGET_NAME} PRIVATE ${FASTER_BUILD_PCH_HEADER})
+ else()
+ get_target_property(pch_core_header_path openvino::util PCH_CORE_HEADER_PATH)
+ if(NOT pch_core_header_path STREQUAL "pch_core_header_path-NOTFOUND")
+ target_precompile_headers(${TARGET_NAME} PRIVATE ${pch_core_header_path})
+ endif()
+ endif()
foreach(exclude_src IN LISTS FASTER_BUILD_PCH_EXCLUDE)
set_source_files_properties(${exclude_src} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endforeach()
diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake
index 3c635777c3d..ebcd278d791 100644
--- a/cmake/developer_package/frontends/frontends.cmake
+++ b/cmake/developer_package/frontends/frontends.cmake
@@ -171,6 +171,7 @@ macro(ov_add_frontend)
COMMAND_EXPAND_LISTS)
list(APPEND PROTO_SRCS "${OUTPUT_PB_SRC}")
list(APPEND PROTO_HDRS "${OUTPUT_PB_HEADER}")
+ set_source_files_properties(${OUTPUT_PB_SRC} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endforeach()
file(GLOB flatbuffers_schema_files ${frontend_root_dir}/src/schema/*.fbs)
diff --git a/src/bindings/c/src/CMakeLists.txt b/src/bindings/c/src/CMakeLists.txt
index e21f3544d39..aeed125976d 100644
--- a/src/bindings/c/src/CMakeLists.txt
+++ b/src/bindings/c/src/CMakeLists.txt
@@ -65,6 +65,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets
ov_install_pdb(${TARGET_NAME})
+ov_build_target_faster(${TARGET_NAME} PCH)
+
install(DIRECTORY ${OpenVINO_C_API_SOURCE_DIR}/include/openvino/
DESTINATION ${OV_CPACK_INCLUDEDIR}/openvino
COMPONENT ${OV_CPACK_COMP_CORE_C_DEV}
diff --git a/src/bindings/c/tests/CMakeLists.txt b/src/bindings/c/tests/CMakeLists.txt
index b82558e0bd8..6595e405242 100644
--- a/src/bindings/c/tests/CMakeLists.txt
+++ b/src/bindings/c/tests/CMakeLists.txt
@@ -30,6 +30,8 @@ add_dependencies(${TARGET_NAME} mock_engine)
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
+ov_build_target_faster(${TARGET_NAME} PCH PCH_EXCLUDE "ov_windows_conflict_test.cpp")
+
install(TARGETS ${TARGET_NAME}
RUNTIME DESTINATION tests
COMPONENT tests
diff --git a/src/bindings/python/src/pyopenvino/CMakeLists.txt b/src/bindings/python/src/pyopenvino/CMakeLists.txt
index 142eee29f9b..41bbcd67fcd 100644
--- a/src/bindings/python/src/pyopenvino/CMakeLists.txt
+++ b/src/bindings/python/src/pyopenvino/CMakeLists.txt
@@ -96,6 +96,8 @@ add_custom_command(TARGET ${PROJECT_NAME}
ov_python_minimal_api(${PROJECT_NAME})
ov_add_clang_format_target(${PROJECT_NAME}_clang FOR_TARGETS ${PROJECT_NAME})
+ov_build_target_faster(${TARGET_NAME} PCH)
+
# install steps
ov_cpack_add_component(${OV_CPACK_COMP_PYTHON_OPENVINO}_${pyversion}
diff --git a/src/common/low_precision_transformations/CMakeLists.txt b/src/common/low_precision_transformations/CMakeLists.txt
index 38b5fefd61a..137eb3ba83d 100644
--- a/src/common/low_precision_transformations/CMakeLists.txt
+++ b/src/common/low_precision_transformations/CMakeLists.txt
@@ -22,7 +22,7 @@ add_library(${TARGET_NAME}_obj OBJECT
target_compile_definitions(${TARGET_NAME}_obj PRIVATE IMPLEMENT_OPENVINO_API)
-ov_build_target_faster(${TARGET_NAME}_obj UNITY)
+ov_build_target_faster(${TARGET_NAME}_obj UNITY PCH)
target_link_libraries(${TARGET_NAME}_obj PRIVATE openvino::itt openvino::core::dev)
diff --git a/src/common/low_precision_transformations/tests/CMakeLists.txt b/src/common/low_precision_transformations/tests/CMakeLists.txt
index d7746162864..2a7685111c9 100644
--- a/src/common/low_precision_transformations/tests/CMakeLists.txt
+++ b/src/common/low_precision_transformations/tests/CMakeLists.txt
@@ -19,3 +19,5 @@ ov_add_test_target(
LABELS
OV UNIT LP_TRANSFORMATIONS
)
+
+ov_build_target_faster(${TARGET_NAME} PCH)
diff --git a/src/common/offline_transformations/CMakeLists.txt b/src/common/offline_transformations/CMakeLists.txt
index 006696fe19b..55b7c57950f 100644
--- a/src/common/offline_transformations/CMakeLists.txt
+++ b/src/common/offline_transformations/CMakeLists.txt
@@ -32,6 +32,8 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
+ov_build_target_faster(${TARGET_NAME} PCH)
+
# install & export
ov_developer_package_export_targets(TARGET ${TARGET_NAME}
diff --git a/src/common/snippets/CMakeLists.txt b/src/common/snippets/CMakeLists.txt
index a4a80186014..841de923aa4 100644
--- a/src/common/snippets/CMakeLists.txt
+++ b/src/common/snippets/CMakeLists.txt
@@ -25,6 +25,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME snippets)
ov_build_target_faster(${TARGET_NAME}
UNITY
+ PCH
)
target_link_libraries(${TARGET_NAME} PUBLIC openvino::runtime
diff --git a/src/common/snippets/tests/CMakeLists.txt b/src/common/snippets/tests/CMakeLists.txt
index fd3c558b355..14c823e94a3 100644
--- a/src/common/snippets/tests/CMakeLists.txt
+++ b/src/common/snippets/tests/CMakeLists.txt
@@ -24,7 +24,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL
ov_build_target_faster(${TARGET_NAME}
UNITY
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
add_library(snippets_test_utils STATIC ${CMAKE_CURRENT_SOURCE_DIR}/include/lowering_utils.hpp
diff --git a/src/common/snippets/tests/src/precomp.hpp b/src/common/snippets/tests/src/precomp.hpp
index e687d7f861d..36345815703 100644
--- a/src/common/snippets/tests/src/precomp.hpp
+++ b/src/common/snippets/tests/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/common/transformations/CMakeLists.txt b/src/common/transformations/CMakeLists.txt
index 971cab0930d..f1db49e489c 100644
--- a/src/common/transformations/CMakeLists.txt
+++ b/src/common/transformations/CMakeLists.txt
@@ -21,7 +21,7 @@ target_compile_definitions(${TARGET_NAME}_obj PRIVATE IMPLEMENT_OPENVINO_API)
ov_build_target_faster(${TARGET_NAME}_obj
UNITY
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
target_link_libraries(${TARGET_NAME}_obj PRIVATE openvino::reference openvino::itt openvino::core::dev openvino::shape_inference)
diff --git a/src/common/transformations/src/precomp.hpp b/src/common/transformations/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/common/transformations/src/precomp.hpp
+++ b/src/common/transformations/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/common/transformations/tests/CMakeLists.txt b/src/common/transformations/tests/CMakeLists.txt
index d8d62d62074..57ada5119e0 100644
--- a/src/common/transformations/tests/CMakeLists.txt
+++ b/src/common/transformations/tests/CMakeLists.txt
@@ -23,3 +23,5 @@ ov_add_test_target(
LABELS
OV UNIT TRANSFORMATIONS
)
+
+ov_build_target_faster(${TARGET_NAME} PCH)
diff --git a/src/common/util/CMakeLists.txt b/src/common/util/CMakeLists.txt
index ce353d60887..64ae219bc63 100644
--- a/src/common/util/CMakeLists.txt
+++ b/src/common/util/CMakeLists.txt
@@ -53,6 +53,10 @@ ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
SOURCE_DIRECTORIES ${UTIL_INCLUDE_DIR})
+set_target_properties(${TARGET_NAME} PROPERTIES PCH_CORE_HEADER_PATH "${UTIL_INCLUDE_DIR}/openvino/pch/precomp_std.hpp")
+
+ov_build_target_faster(${TARGET_NAME} PCH)
+
# install & export
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
diff --git a/src/common/util/include/openvino/pch/precomp_core.hpp b/src/common/util/include/openvino/pch/precomp_std.hpp
similarity index 100%
rename from src/common/util/include/openvino/pch/precomp_core.hpp
rename to src/common/util/include/openvino/pch/precomp_std.hpp
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2f500508d0d..a9a4bf9f9ba 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -78,11 +78,6 @@ endif()
target_compile_definitions(openvino_core_obj PRIVATE IMPLEMENT_OPENVINO_API XBYAK_NO_OP_NAMES XBYAK64)
-ov_build_target_faster(openvino_core_obj
- UNITY
- PCH "src/precomp.hpp"
- PCH_EXCLUDE "src/op/util/attr_types.cpp")
-
ov_add_version_defines(src/version.cpp openvino_core_obj)
ov_set_threading_interface_for(openvino_core_obj)
@@ -140,6 +135,11 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/src/pass/convert_precis
target_include_directories(openvino_core_obj PUBLIC $<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH}>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
+ov_build_target_faster(openvino_core_obj
+ UNITY
+ PCH_HEADER "src/precomp.hpp"
+ PCH_EXCLUDE "src/op/util/attr_types.cpp")
+
#-----------------------------------------------------------------------------------------------
# Installation logic...
#-----------------------------------------------------------------------------------------------
diff --git a/src/core/reference/CMakeLists.txt b/src/core/reference/CMakeLists.txt
index f836ba3792d..6dde32e39d9 100644
--- a/src/core/reference/CMakeLists.txt
+++ b/src/core/reference/CMakeLists.txt
@@ -33,7 +33,7 @@ endif()
ov_build_target_faster(${TARGET_NAME}
UNITY
- PCH "src/precomp.hpp")
+ PCH_HEADER "src/precomp.hpp")
ov_set_threading_interface_for(${TARGET_NAME})
diff --git a/src/core/reference/src/precomp.hpp b/src/core/reference/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/core/reference/src/precomp.hpp
+++ b/src/core/reference/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/core/shape_inference/CMakeLists.txt b/src/core/shape_inference/CMakeLists.txt
index 60c5f4c4bb2..d1514ce2775 100644
--- a/src/core/shape_inference/CMakeLists.txt
+++ b/src/core/shape_inference/CMakeLists.txt
@@ -32,6 +32,8 @@ if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY)
endif()
+ov_build_target_faster(${TARGET_NAME} PCH)
+
# developer package
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
diff --git a/src/core/src/precomp.hpp b/src/core/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/core/src/precomp.hpp
+++ b/src/core/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/core/template_extension/CMakeLists.txt b/src/core/template_extension/CMakeLists.txt
index 69af1abda31..c93a6e13890 100644
--- a/src/core/template_extension/CMakeLists.txt
+++ b/src/core/template_extension/CMakeLists.txt
@@ -26,6 +26,8 @@ add_library(${TARGET_NAME} MODULE ${SRC})
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime)
+ov_build_target_faster(${TARGET_NAME} PCH)
+
# [cmake:extension]
install(TARGETS ${TARGET_NAME}
LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL)
diff --git a/src/core/tests/CMakeLists.txt b/src/core/tests/CMakeLists.txt
index d048e729855..3fc5c504a97 100644
--- a/src/core/tests/CMakeLists.txt
+++ b/src/core/tests/CMakeLists.txt
@@ -80,4 +80,6 @@ if(ENABLE_OV_IR_FRONTEND)
add_dependencies(${TARGET_NAME} openvino_ir_frontend)
endif()
+ov_build_target_faster(${TARGET_NAME} PCH)
+
add_subdirectory(frontend)
diff --git a/src/frontends/common/CMakeLists.txt b/src/frontends/common/CMakeLists.txt
index e4d2fe63e16..6e51895d553 100644
--- a/src/frontends/common/CMakeLists.txt
+++ b/src/frontends/common/CMakeLists.txt
@@ -75,6 +75,8 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}_obj
ADDITIONAL_INCLUDE_DIRECTORIES
$<TARGET_PROPERTY:openvino::core::dev,INTERFACE_INCLUDE_DIRECTORIES>)
+ov_build_target_faster(${TARGET_NAME}_obj PCH)
+
# Installation rules header files
install(DIRECTORY ${FRONTEND_INCLUDE_DIR}/openvino
diff --git a/src/frontends/ir/src/CMakeLists.txt b/src/frontends/ir/src/CMakeLists.txt
index 16001cb6331..6cd7c061d71 100644
--- a/src/frontends/ir/src/CMakeLists.txt
+++ b/src/frontends/ir/src/CMakeLists.txt
@@ -6,3 +6,5 @@ ov_add_frontend(NAME ir
FILEDESCRIPTION "FrontEnd to load OpenVINO IR file format"
LINK_LIBRARIES openvino::pugixml
openvino::core::dev)
+
+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 7c363618cc2..74fa1f36b83 100644
--- a/src/frontends/ir/tests/CMakeLists.txt
+++ b/src/frontends/ir/tests/CMakeLists.txt
@@ -21,3 +21,5 @@ ov_add_test_target(
LABELS
OV UNIT IR_FE
)
+
+ov_build_target_faster(${TARGET_NAME} PCH)
diff --git a/src/frontends/jax/src/CMakeLists.txt b/src/frontends/jax/src/CMakeLists.txt
index 887153ff636..808929f02fe 100644
--- a/src/frontends/jax/src/CMakeLists.txt
+++ b/src/frontends/jax/src/CMakeLists.txt
@@ -7,3 +7,5 @@ ov_add_frontend(NAME jax
DISABLE_CPP_INSTALL
FILEDESCRIPTION "FrontEnd to load and convert JAX/Flax models"
LINK_LIBRARIES openvino::util openvino::core::dev)
+
+ov_build_target_faster(openvino_jax_frontend PCH)
diff --git a/src/frontends/onnx/CMakeLists.txt b/src/frontends/onnx/CMakeLists.txt
index 15688b55e0f..80c02b46b82 100644
--- a/src/frontends/onnx/CMakeLists.txt
+++ b/src/frontends/onnx/CMakeLists.txt
@@ -21,6 +21,8 @@ if(Python3_Interpreter_FOUND)
endif()
endif()
+ov_build_target_faster(openvino_onnx_frontend PCH)
+
if(ENABLE_TESTS)
add_subdirectory(tests)
endif()
diff --git a/src/frontends/onnx/frontend/src/precomp.hpp b/src/frontends/onnx/frontend/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/frontends/onnx/frontend/src/precomp.hpp
+++ b/src/frontends/onnx/frontend/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/frontends/onnx/tests/CMakeLists.txt b/src/frontends/onnx/tests/CMakeLists.txt
index fa67f305199..5e70227868a 100644
--- a/src/frontends/onnx/tests/CMakeLists.txt
+++ b/src/frontends/onnx/tests/CMakeLists.txt
@@ -148,6 +148,8 @@ if(OV_COMPILER_IS_CLANG)
target_compile_options(ov_onnx_frontend_tests PRIVATE -Wno-undef -Wno-reserved-id-macro)
endif()
+ov_build_target_faster(ov_onnx_frontend_tests PCH)
+
# Install rules
install(TARGETS ov_onnx_frontend_tests
diff --git a/src/frontends/paddle/src/CMakeLists.txt b/src/frontends/paddle/src/CMakeLists.txt
index 0ff81f4cc8d..d77a339eee7 100644
--- a/src/frontends/paddle/src/CMakeLists.txt
+++ b/src/frontends/paddle/src/CMakeLists.txt
@@ -8,3 +8,5 @@ ov_add_frontend(NAME paddle
PROTOBUF_LITE
FILEDESCRIPTION "FrontEnd to load and convert PaddlePaddle file format"
LINK_LIBRARIES openvino::util openvino::core::dev)
+
+ov_build_target_faster(openvino_paddle_frontend PCH)
diff --git a/src/frontends/paddle/tests/CMakeLists.txt b/src/frontends/paddle/tests/CMakeLists.txt
index 018e8d889c9..de51a707683 100644
--- a/src/frontends/paddle/tests/CMakeLists.txt
+++ b/src/frontends/paddle/tests/CMakeLists.txt
@@ -54,7 +54,7 @@ if(paddlepaddle_FOUND)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "PaddlePaddle version: ${PADDLE_VERSION}")
-
+
if(PADDLE_VERSION VERSION_GREATER_EQUAL "2.6.0" OR PADDLE_VERSION VERSION_EQUAL "0.0.0")
set(PADDLEDET_OPS_URL "https://raw.githubusercontent.com/PaddlePaddle/PaddleDetection/release/2.5/ppdet/modeling/ops.py")
set(PADDLEDET_OPS_SHA256 "e3da816421698ee97bb272c4410a03c300ab92045b7c87cccb9e52a8c18bc088")
@@ -64,7 +64,7 @@ if(paddlepaddle_FOUND)
set(PADDLEDET_OPS_SHA256 "5cc079eda295ed78b58fba8223c51d85a931a7069ecad51c6af5c2fd26b7a8cb")
set(PADDLEDET_DIRNAME ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/PaddleDetection/release21/ppdet/modeling/)
endif()
-
+
DownloadAndCheck(${PADDLEDET_OPS_URL} ${PADDLEDET_DIRNAME}/ops.py PADDLEDET_FATAL PADDLEDET_RESULT ${PADDLEDET_OPS_SHA256})
endif()
@@ -104,4 +104,6 @@ if(ENABLE_INTEL_CPU)
add_dependencies(${TARGET_NAME} openvino_intel_cpu_plugin)
endif()
+ov_build_target_faster(${TARGET_NAME} PCH)
+
add_subdirectory(standalone_build)
diff --git a/src/frontends/pytorch/src/CMakeLists.txt b/src/frontends/pytorch/src/CMakeLists.txt
index e1c0998dd24..5b59523637e 100644
--- a/src/frontends/pytorch/src/CMakeLists.txt
+++ b/src/frontends/pytorch/src/CMakeLists.txt
@@ -7,3 +7,5 @@ ov_add_frontend(NAME pytorch
SHUTDOWN_PROTOBUF
FILEDESCRIPTION "FrontEnd to load and convert TorchScript models from PyTorch"
LINK_LIBRARIES openvino::util openvino::core::dev)
+
+ov_build_target_faster(openvino_pytorch_frontend PCH)
diff --git a/src/frontends/tensorflow/src/CMakeLists.txt b/src/frontends/tensorflow/src/CMakeLists.txt
index 0cfe727658e..9a9d2e68bad 100644
--- a/src/frontends/tensorflow/src/CMakeLists.txt
+++ b/src/frontends/tensorflow/src/CMakeLists.txt
@@ -12,3 +12,5 @@ if(ENABLE_SNAPPY_COMPRESSION)
target_link_libraries(openvino_tensorflow_frontend PRIVATE openvino::snappy)
target_compile_definitions(openvino_tensorflow_frontend PRIVATE ENABLE_SNAPPY_COMPRESSION)
endif()
+
+ov_build_target_faster(openvino_tensorflow_frontend PCH)
diff --git a/src/frontends/tensorflow/tests/CMakeLists.txt b/src/frontends/tensorflow/tests/CMakeLists.txt
index 3c6041d8eea..3343210c994 100644
--- a/src/frontends/tensorflow/tests/CMakeLists.txt
+++ b/src/frontends/tensorflow/tests/CMakeLists.txt
@@ -25,9 +25,9 @@ ov_add_test_target(
EXCLUDED_SOURCE_PATHS ${EXCLUDED_TESTS}
DEPENDENCIES ${TF_TESTS_DEPENDENCIES}
LINK_LIBRARIES
- gtest_main_manifest
- frontend_shared_test_classes
- openvino_tensorflow_frontend
+ gtest_main_manifest
+ frontend_shared_test_classes
+ openvino_tensorflow_frontend
openvino_tensorflow_common
ADD_CLANG_FORMAT
LABELS
@@ -81,5 +81,7 @@ endif()
get_target_property(TENSORFLOW_FRONTEND_SRC_DIR openvino_tensorflow_frontend SOURCE_DIR)
+ov_build_target_faster(${TARGET_NAME} PCH)
+
add_subdirectory(standalone_build)
add_dependencies(${TARGET_NAME} tensorflow_fe_standalone_build_test)
diff --git a/src/frontends/tensorflow_common/src/CMakeLists.txt b/src/frontends/tensorflow_common/src/CMakeLists.txt
index 77719bf73fb..8fa2f376daa 100644
--- a/src/frontends/tensorflow_common/src/CMakeLists.txt
+++ b/src/frontends/tensorflow_common/src/CMakeLists.txt
@@ -39,3 +39,5 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
ADDITIONAL_INCLUDE_DIRECTORIES
$<TARGET_PROPERTY:${TARGET_NAME},INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:${TARGET_NAME},INCLUDE_DIRECTORIES>)
+
+ov_build_target_faster(${TARGET_NAME} PCH)
diff --git a/src/frontends/tensorflow_lite/src/CMakeLists.txt b/src/frontends/tensorflow_lite/src/CMakeLists.txt
index 562b6836851..44aa65f8eb6 100644
--- a/src/frontends/tensorflow_lite/src/CMakeLists.txt
+++ b/src/frontends/tensorflow_lite/src/CMakeLists.txt
@@ -6,3 +6,5 @@ ov_add_frontend(NAME tensorflow_lite
LINKABLE_FRONTEND
FILEDESCRIPTION "FrontEnd to load and convert TensorFlow Lite file format"
LINK_LIBRARIES openvino::core::dev openvino::frontend::tensorflow_common)
+
+ov_build_target_faster(openvino_tensorflow_lite_frontend PCH)
diff --git a/src/frontends/tensorflow_lite/tests/CMakeLists.txt b/src/frontends/tensorflow_lite/tests/CMakeLists.txt
index 2e965a48340..01eb138d87e 100644
--- a/src/frontends/tensorflow_lite/tests/CMakeLists.txt
+++ b/src/frontends/tensorflow_lite/tests/CMakeLists.txt
@@ -20,8 +20,8 @@ ov_add_test_target(
tensorflow_lite_test_models
tensorflow_lite_fe_standalone_build_test
LINK_LIBRARIES
- gtest_main_manifest
- frontend_shared_test_classes
+ gtest_main_manifest
+ frontend_shared_test_classes
openvino_tensorflow_lite_frontend
ADD_CLANG_FORMAT
LABELS
@@ -75,3 +75,5 @@ get_target_property(TENSORFLOW_LITE_FRONTEND_SRC_DIR openvino_tensorflow_lite_fr
add_subdirectory(standalone_build)
add_dependencies(${TARGET_NAME} tensorflow_lite_fe_standalone_build_test)
+
+ov_build_target_faster(${TARGET_NAME} PCH)
diff --git a/src/frontends/tests/frontend/shared/CMakeLists.txt b/src/frontends/tests/frontend/shared/CMakeLists.txt
index ada56f94af0..f6a4b7a8bd5 100644
--- a/src/frontends/tests/frontend/shared/CMakeLists.txt
+++ b/src/frontends/tests/frontend/shared/CMakeLists.txt
@@ -33,3 +33,5 @@ target_compile_definitions(${TARGET_NAME}
SHARED_LIB_SUFFIX="${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
+
+ov_build_target_faster(${TARGET_NAME} PCH)
diff --git a/src/inference/CMakeLists.txt b/src/inference/CMakeLists.txt
index 8dc0098db0c..ea264e9a807 100644
--- a/src/inference/CMakeLists.txt
+++ b/src/inference/CMakeLists.txt
@@ -69,7 +69,8 @@ if(NOT BUILD_SHARED_LIBS)
endif()
ov_build_target_faster(${TARGET_NAME}_obj
- UNITY PCH "src/precomp.hpp"
+ UNITY
+ PCH_HEADER "src/precomp.hpp"
)
target_compile_definitions(${TARGET_NAME}_obj PRIVATE
diff --git a/src/inference/src/precomp.hpp b/src/inference/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/inference/src/precomp.hpp
+++ b/src/inference/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/plugins/intel_npu/src/compiler_adapter/CMakeLists.txt b/src/plugins/intel_npu/src/compiler_adapter/CMakeLists.txt
index c7f4393041a..2e35cbb7da0 100644
--- a/src/plugins/intel_npu/src/compiler_adapter/CMakeLists.txt
+++ b/src/plugins/intel_npu/src/compiler_adapter/CMakeLists.txt
@@ -10,7 +10,7 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCES})
add_library(${TARGET_NAME} STATIC ${SOURCES})
ov_build_target_faster(${TARGET_NAME}
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/precomp.hpp b/src/plugins/intel_npu/src/compiler_adapter/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/plugins/intel_npu/src/compiler_adapter/src/precomp.hpp
+++ b/src/plugins/intel_npu/src/compiler_adapter/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/tests/functional/plugin/shared/CMakeLists.txt b/src/tests/functional/plugin/shared/CMakeLists.txt
index 95f422d7f1e..bb9a59ebd4d 100644
--- a/src/tests/functional/plugin/shared/CMakeLists.txt
+++ b/src/tests/functional/plugin/shared/CMakeLists.txt
@@ -74,7 +74,7 @@ ov_add_target(
)
ov_build_target_faster(${TARGET_NAME}
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
# install & export
diff --git a/src/tests/functional/plugin/shared/src/precomp.hpp b/src/tests/functional/plugin/shared/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/tests/functional/plugin/shared/src/precomp.hpp
+++ b/src/tests/functional/plugin/shared/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/tests/functional/shared_test_classes/CMakeLists.txt b/src/tests/functional/shared_test_classes/CMakeLists.txt
index 6e065016220..6f2211f54db 100644
--- a/src/tests/functional/shared_test_classes/CMakeLists.txt
+++ b/src/tests/functional/shared_test_classes/CMakeLists.txt
@@ -22,8 +22,8 @@ ov_add_target(
)
ov_build_target_faster(${TARGET_NAME}
- PCH "src/precomp.hpp"
- )
+ PCH_HEADER "src/precomp.hpp"
+)
# install & export
diff --git a/src/tests/functional/shared_test_classes/src/precomp.hpp b/src/tests/functional/shared_test_classes/src/precomp.hpp
index 64b9bd6b183..6f506ff547d 100644
--- a/src/tests/functional/shared_test_classes/src/precomp.hpp
+++ b/src/tests/functional/shared_test_classes/src/precomp.hpp
@@ -4,5 +4,5 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/tests/ov_helpers/ov_lpt_models/CMakeLists.txt b/src/tests/ov_helpers/ov_lpt_models/CMakeLists.txt
index 5861e1d41a0..d30c8a9ebf4 100644
--- a/src/tests/ov_helpers/ov_lpt_models/CMakeLists.txt
+++ b/src/tests/ov_helpers/ov_lpt_models/CMakeLists.txt
@@ -24,7 +24,7 @@ ov_add_target(
ov_build_target_faster(${TARGET_NAME}
UNITY
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
# install & export
diff --git a/src/tests/ov_helpers/ov_lpt_models/src/precomp.hpp b/src/tests/ov_helpers/ov_lpt_models/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/tests/ov_helpers/ov_lpt_models/src/precomp.hpp
+++ b/src/tests/ov_helpers/ov_lpt_models/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/tests/ov_helpers/ov_snippets_models/CMakeLists.txt b/src/tests/ov_helpers/ov_snippets_models/CMakeLists.txt
index 8384fc44c36..053319f95b6 100644
--- a/src/tests/ov_helpers/ov_snippets_models/CMakeLists.txt
+++ b/src/tests/ov_helpers/ov_snippets_models/CMakeLists.txt
@@ -27,7 +27,7 @@ ov_add_target(
ov_build_target_faster(${TARGET_NAME}
UNITY
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
# install & export
diff --git a/src/tests/ov_helpers/ov_snippets_models/src/precomp.hpp b/src/tests/ov_helpers/ov_snippets_models/src/precomp.hpp
index 24dccad71fa..cbca105e973 100644
--- a/src/tests/ov_helpers/ov_snippets_models/src/precomp.hpp
+++ b/src/tests/ov_helpers/ov_snippets_models/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/tests/test_utils/common_test_utils/CMakeLists.txt b/src/tests/test_utils/common_test_utils/CMakeLists.txt
index e8da331a94c..02ca7abcc3e 100644
--- a/src/tests/test_utils/common_test_utils/CMakeLists.txt
+++ b/src/tests/test_utils/common_test_utils/CMakeLists.txt
@@ -57,7 +57,7 @@ function(add_common_utils ADD_TARGET_NAME)
ov_build_target_faster(${ADD_TARGET_NAME}
UNITY
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
target_include_directories(${ADD_TARGET_NAME}
diff --git a/src/tests/test_utils/common_test_utils/src/precomp.hpp b/src/tests/test_utils/common_test_utils/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/tests/test_utils/common_test_utils/src/precomp.hpp
+++ b/src/tests/test_utils/common_test_utils/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"
diff --git a/src/tests/test_utils/functional_test_utils/CMakeLists.txt b/src/tests/test_utils/functional_test_utils/CMakeLists.txt
index e1201aaafc7..f7197adca72 100644
--- a/src/tests/test_utils/functional_test_utils/CMakeLists.txt
+++ b/src/tests/test_utils/functional_test_utils/CMakeLists.txt
@@ -24,7 +24,7 @@ ov_add_target(
)
ov_build_target_faster(${TARGET_NAME}
- PCH "src/precomp.hpp"
+ PCH_HEADER "src/precomp.hpp"
)
# install & export
diff --git a/src/tests/test_utils/functional_test_utils/src/precomp.hpp b/src/tests/test_utils/functional_test_utils/src/precomp.hpp
index 886fd9992b8..9788c4f8cb0 100644
--- a/src/tests/test_utils/functional_test_utils/src/precomp.hpp
+++ b/src/tests/test_utils/functional_test_utils/src/precomp.hpp
@@ -4,4 +4,4 @@
#pragma once
-#include "openvino/pch/precomp_core.hpp"
+#include "openvino/pch/precomp_std.hpp"