Skip to content

Commit

Permalink
added ability to exclude frontend from all target
Browse files Browse the repository at this point in the history
  • Loading branch information
mryzhov committed Oct 10, 2024
1 parent 8517c36 commit 1957760
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cmake/developer_package/frontends/frontends.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ endmacro()
# FILEDESCRIPTION <description> # used on Windows to describe DLL file
# [LINKABLE_FRONTEND] # whether we can use FE API directly or via FEM only
# [SKIP_INSTALL] # private frontend, not for end users
# [EXCLUDE_FROM_ALL] # exclude from all target
# [PROTOBUF_REQUIRED] # options to denote that protobuf is used
# [PROTOBUF_LITE] # requires only libprotobuf-lite
# [SKIP_NCC_STYLE] # use custom NCC rules
# [LINK_LIBRARIES <lib1 lib2 ...>])
#
macro(ov_add_frontend)
set(options LINKABLE_FRONTEND PROTOBUF_REQUIRED PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL)
set(options LINKABLE_FRONTEND PROTOBUF_REQUIRED PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL EXCLUDE_FROM_ALL)
set(oneValueArgs NAME FILEDESCRIPTION)
set(multiValueArgs LINK_LIBRARIES PROTO_FILES)
cmake_parse_arguments(OV_FRONTEND "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
Expand Down Expand Up @@ -306,6 +307,13 @@ macro(ov_add_frontend)
# installation

if(NOT OV_FRONTEND_SKIP_INSTALL)
if(OV_FRONTEND_EXCLUDE_FROM_ALL)
set(OV_FRONTEND_EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL)
set(OV_FRONTEND_LINKS_EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL)
else()
set(OV_FRONTEND_EXCLUDE_FROM_ALL ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
set(OV_FRONTEND_LINKS_EXCLUDE_FROM_ALL ${OV_CPACK_COMP_LINKS_EXCLUDE_ALL})
endif()
if(BUILD_SHARED_LIBS)
# Note:
# we use 'framework' as component for deployment scenario, i.e. for libraries itself
Expand All @@ -318,8 +326,8 @@ macro(ov_add_frontend)

if(OV_FRONTEND_LINKABLE_FRONTEND)
set(export_set EXPORT OpenVINOTargets)
set(archive_dest ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${dev_component} ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
set(namelink NAMELINK_COMPONENT ${OV_CPACK_COMP_LINKS} ${OV_CPACK_COMP_LINKS_EXCLUDE_ALL})
set(archive_dest ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${dev_component} ${OV_FRONTEND_EXCLUDE_FROM_ALL})
set(namelink NAMELINK_COMPONENT ${OV_CPACK_COMP_LINKS} ${OV_FRONTEND_LINKS_EXCLUDE_FROM_ALL})
else()
set(namelink NAMELINK_SKIP)
endif()
Expand All @@ -343,7 +351,7 @@ macro(ov_add_frontend)
install(DIRECTORY ${${TARGET_NAME}_INCLUDE_DIR}/openvino
DESTINATION ${FRONTEND_INSTALL_INCLUDE}
COMPONENT ${dev_component}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}
${OV_FRONTEND_EXCLUDE_FROM_ALL}
FILES_MATCHING PATTERN "*.hpp")

# public target name
Expand Down
1 change: 1 addition & 0 deletions src/frontends/jax/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GRE
endif()

ov_add_frontend(NAME jax
EXCLUDE_FROM_ALL
LINKABLE_FRONTEND
FILEDESCRIPTION "FrontEnd to load and convert JAX/Flax models"
LINK_LIBRARIES openvino::util openvino::core::dev)

0 comments on commit 1957760

Please sign in to comment.