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:
Ilya Lavrenov
2022-09-26 07:48:41 +04:00
committed by GitHub
parent d82cdc39e4
commit 12f1e95c3d
5 changed files with 28 additions and 12 deletions

View File

@@ -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})

View File

@@ -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()