Improvements for OSX build (#13201)
* Hide some helper variables as internal ones * Added an ability to test private API for TF FE * OSX improvements * Fixed project generation for xcode
This commit is contained in:
parent
d82cdc39e4
commit
12f1e95c3d
@ -177,8 +177,11 @@ function(ov_download_tbbbind_2_5)
|
||||
ENVIRONMENT "TBBBIND_2_5_ROOT"
|
||||
SHA256 "865e7894c58402233caf0d1b288056e0e6ab2bf7c9d00c9dc60561c484bc90f4")
|
||||
else()
|
||||
message(WARNING "prebuilt TBBBIND_2_5 is not available.
|
||||
# TMP: for Apple Silicon TBB does not provide TBBBind
|
||||
if(NOT (APPLE AND AARCH64))
|
||||
message(WARNING "prebuilt TBBBIND_2_5 is not available.
|
||||
Build oneTBB from sources and set TBBROOT environment var before OpenVINO cmake configure")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@ -79,6 +79,11 @@ if(NOT COMMAND find_host_package)
|
||||
find_package(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
if(NOT COMMAND find_host_library)
|
||||
macro(find_host_library)
|
||||
find_library(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
if(NOT COMMAND find_host_program)
|
||||
macro(find_host_program)
|
||||
find_program(${ARGN})
|
||||
|
@ -56,13 +56,23 @@ endif()
|
||||
# Since we were able to find_package(Clang) in a separate process
|
||||
# let's try to find in current process
|
||||
if(ENABLE_NCC_STYLE)
|
||||
find_host_package(Clang QUIET)
|
||||
if(APPLE)
|
||||
find_host_library(libclang_location NAMES clang
|
||||
PATHS /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
|
||||
DOC "Path to clang library")
|
||||
else()
|
||||
find_host_package(Clang QUIET)
|
||||
endif()
|
||||
|
||||
if(Clang_FOUND AND TARGET libclang)
|
||||
get_target_property(libclang_location libclang LOCATION)
|
||||
message(STATUS "Found libclang: ${libclang_location}")
|
||||
else()
|
||||
endif()
|
||||
|
||||
if(NOT libclang_location)
|
||||
message(WARNING "clang-${clang_version} libclang-${clang_version}-dev are not found (required for ncc naming style check)")
|
||||
set(ENABLE_NCC_STYLE OFF)
|
||||
else()
|
||||
message(STATUS "Found libclang: ${libclang_location}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -38,8 +38,9 @@ if(_ov_dynamic_tbbbind_2_5_found)
|
||||
message(STATUS "Static tbbbind_2_5 package usage is disabled, since oneTBB (ver. ${TBB_VERSION}) provides dynamic TBBBind 2.5")
|
||||
set(ENABLE_TBBBIND_2_5 OFF)
|
||||
elseif(ENABLE_TBBBIND_2_5)
|
||||
if(TBB_VERSION VERSION_GREATER_EQUAL 2021)
|
||||
message(STATUS "oneTBB (ver. ${TBB_VERSION}) is used, but dynamic TBBBind 2.5 is not found. Use custom static TBBBind 2.5")
|
||||
# TMP: for Apple Silicon TBB does not provide TBBBind
|
||||
if(TBB_VERSION VERSION_GREATER_EQUAL 2021 AND NOT (APPLE AND AARCH64))
|
||||
message(STATUS "oneTBB (ver. ${TBB_VERSION}) is used, but dynamic TBBBind 2.5+ is not found. Use custom static TBBBind 2.5")
|
||||
endif()
|
||||
|
||||
# download and find a prebuilt version of TBBBind_2_5
|
||||
|
@ -50,12 +50,9 @@ else()
|
||||
set(FRONTEND_LIB_SUFFIX "${FRONTEND_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}${OpenVINO_VERSION_SUFFIX}")
|
||||
endif()
|
||||
|
||||
set_property(SOURCE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/plugin_loader.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/manager.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
FRONTEND_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}${FRONTEND_NAME_PREFIX}"
|
||||
FRONTEND_LIB_SUFFIX="${FRONTEND_LIB_SUFFIX}")
|
||||
target_compile_definitions(${TARGET_NAME}_obj PRIVATE
|
||||
FRONTEND_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}${FRONTEND_NAME_PREFIX}"
|
||||
FRONTEND_LIB_SUFFIX="${FRONTEND_LIB_SUFFIX}")
|
||||
|
||||
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}_obj)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user