Unverified Commit 6425a516 authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

fix building with mpi on local machine (#1027)

parent 98740cd7
...@@ -251,6 +251,8 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND MKLDNN_INCLUDE_DIR) ...@@ -251,6 +251,8 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND MKLDNN_INCLUDE_DIR)
set(NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING "Enable debuginfo in the CPU backend") set(NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING "Enable debuginfo in the CPU backend")
if(NGRAPH_DISTRIBUTED_ENABLE AND MPI_CXX_INCLUDE_PATH) if(NGRAPH_DISTRIBUTED_ENABLE AND MPI_CXX_INCLUDE_PATH)
find_package(MPI REQUIRED)
string(REPLACE ";" "\\;" MPI_C_INCLUDE_PATH "${MPI_C_INCLUDE_PATH}")
include_directories(SYSTEM ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH}) include_directories(SYSTEM ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
link_directories(${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES}) link_directories(${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
......
...@@ -260,13 +260,17 @@ bool codegen::StaticCompiler::is_version_number(const string& path) ...@@ -260,13 +260,17 @@ bool codegen::StaticCompiler::is_version_number(const string& path)
return rc; return rc;
} }
void codegen::StaticCompiler::add_header_search_path(const string& path) void codegen::StaticCompiler::add_header_search_path(const string& p)
{ {
if (!contains(m_extra_search_path_list, path)) vector<string> paths = split(p, ';');
for (const string& path : paths)
{ {
m_extra_search_path_list.push_back(path); if (!contains(m_extra_search_path_list, path))
HeaderSearchOptions& hso = m_compiler->getInvocation().getHeaderSearchOpts(); {
hso.AddPath(path, clang::frontend::System, false, false); m_extra_search_path_list.push_back(path);
HeaderSearchOptions& hso = m_compiler->getInvocation().getHeaderSearchOpts();
hso.AddPath(path, clang::frontend::System, false, false);
}
} }
} }
......
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