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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user