diff --git a/cmake/developer_package/cpplint/cpplint.cmake b/cmake/developer_package/cpplint/cpplint.cmake index d4da25ea31952f..e22c8f2e034b96 100644 --- a/cmake/developer_package/cpplint/cpplint.cmake +++ b/cmake/developer_package/cpplint/cpplint.cmake @@ -14,7 +14,6 @@ endif() if(ENABLE_CPPLINT AND NOT TARGET cpplint_all) add_custom_target(cpplint_all ALL) set_target_properties(cpplint_all PROPERTIES FOLDER cpplint) - set(CPPLINT_ALL_OUTPUT_FILES "" CACHE INTERNAL "All cpplint output files") endif() function(add_cpplint_target TARGET_NAME) @@ -58,6 +57,7 @@ function(add_cpplint_target TARGET_NAME) endif() file(RELATIVE_PATH source_file_relative "${CMAKE_CURRENT_SOURCE_DIR}" "${source_file}") + file(RELATIVE_PATH source_file_relative_root "${CMAKE_SOURCE_DIR}" "${source_file}") set(output_file "${CMAKE_CURRENT_BINARY_DIR}/cpplint/${source_file_relative}.cpplint") string(REPLACE ".." "__" output_file "${output_file}") get_filename_component(output_dir "${output_file}" DIRECTORY) @@ -81,17 +81,12 @@ function(add_cpplint_target TARGET_NAME) "${IEDevScripts_DIR}/cpplint/cpplint.py" "${IEDevScripts_DIR}/cpplint/cpplint_run.cmake" COMMENT - "[cpplint] ${source_file}" + "[cpplint] ${source_file_relative_root}" VERBATIM) list(APPEND all_output_files "${output_file}") endforeach() - set(CPPLINT_ALL_OUTPUT_FILES - ${CPPLINT_ALL_OUTPUT_FILES} ${all_output_files} - CACHE INTERNAL - "All cpplint output files") - add_custom_target(${TARGET_NAME} ALL DEPENDS ${all_output_files} COMMENT "[cpplint] ${TARGET_NAME}") diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake index 964dc6da443e81..78e62101670425 100644 --- a/cmake/developer_package/frontends/frontends.cmake +++ b/cmake/developer_package/frontends/frontends.cmake @@ -127,17 +127,17 @@ macro(ov_add_frontend) # Generate protobuf file on build time for each '.proto' file in src/proto file(GLOB proto_files ${frontend_root_dir}/src/proto/*.proto) - foreach(INFILE IN LISTS proto_files) - get_filename_component(FILE_DIR ${INFILE} DIRECTORY) - get_filename_component(FILE_WE ${INFILE} NAME_WE) + foreach(proto_file IN LISTS proto_files) + file(RELATIVE_PATH proto_file_relative "${CMAKE_SOURCE_DIR}" "${proto_file}") + get_filename_component(FILE_DIR ${proto_file} DIRECTORY) + get_filename_component(FILE_WE ${proto_file} NAME_WE) set(OUTPUT_PB_SRC ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}.pb.cc) set(OUTPUT_PB_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}.pb.h) - set(GENERATED_PROTO ${INFILE}) add_custom_command( OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}" COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto - DEPENDS ${PROTOC_DEPENDENCY} ${GENERATED_PROTO} - COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${GENERATED_PROTO}" + DEPENDS ${PROTOC_DEPENDENCY} ${proto_file} + COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${proto_file_relative}" VERBATIM COMMAND_EXPAND_LISTS) list(APPEND PROTO_SRCS "${OUTPUT_PB_SRC}") @@ -145,15 +145,15 @@ macro(ov_add_frontend) endforeach() file(GLOB flatbuffers_schema_files ${frontend_root_dir}/src/schema/*.fbs) - foreach(INFILE IN LISTS flatbuffers_schema_files) - get_filename_component(FILE_WE ${INFILE} NAME_WE) + foreach(flatbuffers_schema_file IN LISTS flatbuffers_schema_files) + file(RELATIVE_PATH flatbuffers_schema_file_relative "${CMAKE_SOURCE_DIR}" "${flatbuffers_schema_file}") + get_filename_component(FILE_WE "${flatbuffers_schema_file}" NAME_WE) set(OUTPUT_FC_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${FILE_WE}_generated.h) - set(GENERATED_PROTO ${INFILE}) add_custom_command( OUTPUT "${OUTPUT_FC_HEADER}" - COMMAND ${flatbuffers_COMPILER} ARGS -c --gen-mutable -o ${CMAKE_CURRENT_BINARY_DIR} ${INFILE} - DEPENDS ${flatbuffers_DEPENDENCY} ${GENERATED_PROTO} - COMMENT "Running C++ flatbuffers compiler (${flatbuffers_COMPILER}) on ${GENERATED_PROTO}" + COMMAND ${flatbuffers_COMPILER} ARGS -c --gen-mutable -o ${CMAKE_CURRENT_BINARY_DIR} ${flatbuffers_schema_file} + DEPENDS ${flatbuffers_DEPENDENCY} ${flatbuffers_schema_file} + COMMENT "Running C++ flatbuffers compiler (${flatbuffers_COMPILER}) on ${flatbuffers_schema_file_relative}" VERBATIM COMMAND_EXPAND_LISTS) list(APPEND PROTO_HDRS "${OUTPUT_FC_HEADER}") diff --git a/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake b/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake index b27dcbc7e84f2f..8d02cf9890a5be 100644 --- a/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake +++ b/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake @@ -68,7 +68,11 @@ if(CYTHON_EXIT_CODE EQUAL 0) string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}") else() if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) - set(CYTHON_MESSAGE_MODE TRACE) + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) + set(CYTHON_MESSAGE_MODE TRACE) + else() + set(CYTHON_MESSAGE_MODE WARNING) + endif() endif() if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) set(CYTHON_MESSAGE_MODE FATAL_ERROR) diff --git a/src/core/tests/frontend/CMakeLists.txt b/src/core/tests/frontend/CMakeLists.txt index 8f6d2a17b40b6f..dd096fed759a94 100644 --- a/src/core/tests/frontend/CMakeLists.txt +++ b/src/core/tests/frontend/CMakeLists.txt @@ -4,7 +4,7 @@ set(SRC ${CMAKE_CURRENT_SOURCE_DIR}/mock_frontend.cpp) set(MOCK1_FE_NAME openvino_mock1_frontend) -add_library(${MOCK1_FE_NAME} SHARED EXCLUDE_FROM_ALL ${SRC}) +add_library(${MOCK1_FE_NAME} SHARED ${SRC}) ov_add_library_version(${MOCK1_FE_NAME}) @@ -18,5 +18,5 @@ add_dependencies(ov_core_unit_tests ${MOCK1_FE_NAME}) ov_add_clang_format_target(${MOCK1_FE_NAME}_clang FOR_TARGETS ${MOCK1_FE_NAME}) install(TARGETS ${MOCK1_FE_NAME} - RUNTIME DESTINATION tests COMPONENT tests OPTIONAL EXCLUDE_FROM_ALL - LIBRARY DESTINATION tests COMPONENT tests OPTIONAL EXCLUDE_FROM_ALL) + RUNTIME DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL + LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL)