Commit bbbe1667 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

python: fix compilation of DPsim extension in debug mode via setuptools

parent 267ee150
......@@ -36,17 +36,19 @@ class CMakeBuild(build_ext):
'-DBUILD_EXAMPLES=OFF']
cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]
cmake_args = ['-DCMAKE_BUILD_TYPE=' + cfg]
print("building CMake extension in %s configuration" % cfg)
if platform.system() == "Windows":
cmake_args += ['-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=' + extdir]
cmake_args += ['-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=' + extdir]
if sys.maxsize > 2**32:
cmake_args += ['-A', 'x64']
build_args += ['--', '/m']
build_args = ['--', '/m']
else:
cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir]
build_args += ['--', '-j4']
build_args = ['--', '-j4']
env = os.environ.copy()
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''), self.distribution.get_version())
......
Supports Markdown
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