Skip to content

Commit d2c8ec5

Browse files
committed
Fix MacOS build
Signed-off-by: caozhong <[email protected]>
1 parent 2602439 commit d2c8ec5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ set(IDEEP_VERSION
1010

1111
option(multinode "Provide non-blocking communciation support for machine learning" OFF)
1212

13+
IF(APPLE)
14+
SET(CMAKE_INSTALL_NAME_DIR @rpath)
15+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
16+
ENDIF(APPLE)
17+
1318
set(USE_MKLDNN_INTERNAL 1)
1419
include(cmake/profiling.cmake)
1520
include(cmake/mkldnn.cmake)

python/setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,11 @@ def run(self):
145145
]
146146

147147
if os_name == 'Linux':
148-
libraries = ['mkldnn', 'mklml_intel', 'ideep'] # , 'dlcomp']
148+
libraries = ['mkldnn', 'mklml_intel', 'ideep', 'm'] # , 'dlcomp']
149149
ccxx_opts += ['-fopenmp']
150-
libraries += ['m']
151150
link_opts += ['-Wl,-z,now', '-Wl,-z,noexecstack']
152151
else:
153-
libraries = ['mkldnn', 'mklml']
152+
libraries = ['mkldnn', 'mklml', 'ideep']
154153

155154
src = ['ideep4py/py/ideep4py.i',
156155
'ideep4py/py/mm/mdarray.cc',

0 commit comments

Comments
 (0)