Minimize rebuild for Makefiles generator (#16729)

* Add dependency from ov_plugins.hpp only for files which use it

* Remove rebuild files depends on CI_BUILD_NUMBER changes

* Try to fix static build

* Fixed comments

* Fixed build

* Merged some change

* Try to fix build

* Try to fix nvidia build

* Take LTO value from target property
This commit is contained in:
Ilya Churaev
2023-04-06 11:02:28 +04:00
committed by GitHub
parent f2894d09e9
commit 70ef0b5316
10 changed files with 58 additions and 31 deletions

View File

@@ -43,8 +43,6 @@ file(GLOB_RECURSE HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/*.h
${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp)
addVersionDefines(src/gna_plugin_entry_points.cpp CI_BUILD_NUMBER)
find_package(libGNA REQUIRED
PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
NO_DEFAULT_PATH)
@@ -56,6 +54,7 @@ find_package(libGNA REQUIRED
ie_add_plugin(NAME ${TARGET_NAME}
DEVICE_NAME "GNA"
SOURCES ${SOURCES} ${HEADERS}
VERSION_DEFINES_FOR src/gna_plugin_entry_points.cpp
ADD_CLANG_FORMAT)
# Enable support of CC for the plugin
@@ -79,6 +78,8 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
add_library(${TARGET_NAME}_test_static STATIC EXCLUDE_FROM_ALL ${SOURCES} ${HEADERS})
ov_add_version_defines(src/gna_plugin_entry_points.cpp ${TARGET_NAME}_test_static)
target_compile_definitions(${TARGET_NAME}_test_static
PRIVATE
_NO_MKL_