Commit 5395a378 authored by Igor Kaplounenko's avatar Igor Kaplounenko Committed by Robert Kimball

OS X support (#1098)

* updated to work with llvm 8.1 that tensorflow is built with

* sane extensions on the mac

* not doing rpath on apple

* apply style
parent 009e5bb1
......@@ -44,7 +44,7 @@ project (ngraph)
SET(GCC_MIN_VERSION 4.8)
SET(CLANG_MIN_VERSION 3.8)
SET(APPLE_CLANG_MIN_VERSION 9.0)
SET(APPLE_CLANG_MIN_VERSION 8.1)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_MIN_VERSION)
......
......@@ -10,6 +10,7 @@ __pycache__/
# C extensions
*.so
*.dylib
# Distribution / packaging
.Python
......
......@@ -14,6 +14,7 @@
* limitations under the License.
*******************************************************************************/
#include <cstdlib> // llvm 8.1 gets confused about `malloc` otherwise
#include <memory>
#include "ngraph/runtime/aligned_buffer.hpp"
......
......@@ -28,8 +28,13 @@ using namespace std;
TEST(NGraph, loadTest)
{
// load the triangle library
// load the triangle library
#ifndef __APPLE__
void* ngraphImplLib = dlopen("../src/libngraph.so", RTLD_LAZY);
#else
void* ngraphImplLib = dlopen("../src/libngraph.dylib", RTLD_LAZY);
#endif
if (!ngraphImplLib)
{
std::cerr << "Cannot load library: " << dlerror() << '\n';
......
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