Commit b9d7b7d2 authored by Ilya Churaev's avatar Ilya Churaev Committed by Michał Karzyński

Fixed python build for some debug configurations (#3815)

parent e733cb27
......@@ -38,7 +38,7 @@ add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dist/
POST_BUILD
WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${MAKE} -C ../ DESTDIR=python/_install install && bash build_wheel.sh
COMMAND ${CMAKE_BUILD_TOOL} -C ../ DESTDIR=python/_install install && bash build_wheel.sh
)
add_custom_target(python_wheel DEPENDS ngraph ${CMAKE_CURRENT_BINARY_DIR}/dist/)
......
......@@ -19,6 +19,7 @@ from setuptools.command.build_ext import build_ext
import sys
import setuptools
import os
import re
import distutils.ccompiler
__version__ = os.environ.get('NGRAPH_VERSION', '0.0.0-dev')
......@@ -73,6 +74,11 @@ else:
'correctly'.format(NGRAPH_CPP_DIST_DIR))
sys.exit(1)
NGRAPH_CPP_LIBRARY_NAME = 'ngraph'
"""For some platforms OpenVINO adds 'd' suffix to library names in debug configuration"""
if len([fn for fn in os.listdir(NGRAPH_CPP_LIBRARY_DIR) if re.search('ngraphd', fn)]):
NGRAPH_CPP_LIBRARY_NAME = 'ngraphd'
def parallelCCompile(
self,
......@@ -283,7 +289,7 @@ include_dirs = [PYNGRAPH_ROOT_DIR, NGRAPH_CPP_INCLUDE_DIR, PYBIND11_INCLUDE_DIR]
library_dirs = [NGRAPH_CPP_LIBRARY_DIR]
libraries = ['ngraph']
libraries = [NGRAPH_CPP_LIBRARY_NAME]
extra_compile_args = []
if NGRAPH_ONNX_IMPORT_ENABLE in ['TRUE', 'ON', True]:
......
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