Skip to content

Commit 375bc69

Browse files
committed
Fixed build script for NVIDIA CUDA version of standard Zhivo library.
1 parent e628c36 commit 375bc69

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

build.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,21 @@
139139

140140
cuda_lib_args = [
141141
'nvcc', '--shared', '-Ilib', '-o',
142-
os.path.join('dist', 'stdzhv1.0-nvidia'),
143-
'--compiler-options \'-fPIC\'',
142+
os.path.join('dist', 'stdzhv1.0-nvidia')
143+
]
144+
145+
if PLATFORM == 'Windows':
146+
cuda_lib_args[-1] += '.dll'
147+
else:
148+
cuda_lib_args[-1] += '.so'
149+
150+
cuda_lib_args += [
151+
'--compiler-options', '-fPIC',
144152
rt_bin
145153
] + cc_files
146154

147155
if PLATFORM == 'Windows':
148-
cuda_lib_args[4] += '.dll'
149-
else:
150-
cuda_lib_args[4] += '.so'
156+
cuda_lib_args += ['--compiler-options', '/std:c++17']
151157

152158
try:
153159
os.makedirs(OUT_DIR, exist_ok=True)

0 commit comments

Comments
 (0)