Unverified Commit 924b2ff0 authored by Sang Ik Lee's avatar Sang Ik Lee Committed by GitHub

Bug Fix: Codegen - macos system header path is hard wired for mojave. (#4276)

Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
parent c07dc400
......@@ -61,6 +61,10 @@ if(NGRAPH_TBB_ENABLE)
set_source_files_properties(compiler.cpp PROPERTIES COMPILE_DEFINITIONS "NGRAPH_TBB_ENABLE")
endif()
if(APPLE)
list(APPEND HEADER_SEARCH_DEFINES CMAKE_OSX_SYSROOT="${CMAKE_OSX_SYSROOT}")
endif()
set_source_files_properties(compiler.cpp PROPERTIES COMPILE_DEFINITIONS "${HEADER_SEARCH_DEFINES}")
# Generate the resource file containing all headers used by the codegen compiler
......
......@@ -441,12 +441,9 @@ void codegen::CompilerCore::configure_search_path()
add_header_search_path("/Library/Developer/CommandLineTools/usr/include/c++/v1");
add_header_search_path("/usr/local/include");
add_header_search_path(CLANG_BUILTIN_HEADERS_PATH);
std::string mojave_isysroot = file_util::path_join(
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs",
"MacOSX10.14.sdk");
if (file_util::exists(mojave_isysroot))
if (file_util::exists(CMAKE_OSX_SYSROOT))
{
add_header_search_path(file_util::path_join(mojave_isysroot, "usr/include"));
add_header_search_path(file_util::path_join(CMAKE_OSX_SYSROOT, "usr/include"));
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment