Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
1cea1005
Commit
1cea1005
authored
May 01, 2018
by
Christian Sarofeen
Browse files
Don't compile cuda code if running clean.
parent
3a08d827
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
setup.py
setup.py
+19
-14
No files found.
setup.py
View file @
1cea1005
import
re
import
re
import
sys
import
os
import
os
import
shutil
import
shutil
import
inspect
import
inspect
...
@@ -141,18 +142,20 @@ def CompileCudaFiles():
...
@@ -141,18 +142,20 @@ def CompileCudaFiles():
for
object_file
in
object_files
:
for
object_file
in
object_files
:
extra_link_args
.
append
(
object_file
)
extra_link_args
.
append
(
object_file
)
if
'clean'
not
in
sys
.
argv
:
print
()
print
(
"Arguments used to build CUDA extension:"
)
print
(
"extra_compile_args :"
,
extra_compile_args
)
print
(
"include_dirs: "
,
include_dirs
)
print
(
"extra_link_args: "
,
extra_link_args
)
print
(
"library_dirs: "
,
library_dirs
)
print
(
"libraries: "
,
main_libraries
)
print
()
CompileCudaFiles
()
print
(
"Building CUDA extension."
)
print
()
print
(
"Arguments used to build CUDA extension:"
)
print
(
"extra_compile_args :"
,
extra_compile_args
)
print
(
"include_dirs: "
,
include_dirs
)
print
(
"extra_link_args: "
,
extra_link_args
)
print
(
"library_dirs: "
,
library_dirs
)
print
(
"libraries: "
,
main_libraries
)
print
()
CompileCudaFiles
()
print
(
"Building CUDA extension."
)
cuda_ext
=
Extension
(
'apex._C'
,
cuda_ext
=
Extension
(
'apex._C'
,
[
os
.
path
.
join
(
'csrc'
,
'Module.cpp'
)],
[
os
.
path
.
join
(
'csrc'
,
'Module.cpp'
)],
extra_compile_args
=
extra_compile_args
,
extra_compile_args
=
extra_compile_args
,
...
@@ -163,7 +166,9 @@ cuda_ext = Extension('apex._C',
...
@@ -163,7 +166,9 @@ cuda_ext = Extension('apex._C',
libraries
=
main_libraries
libraries
=
main_libraries
)
)
print
(
"Building module."
)
if
'clean'
not
in
sys
.
argv
:
print
(
"Building module."
)
setup
(
setup
(
name
=
'apex'
,
version
=
'0.1'
,
name
=
'apex'
,
version
=
'0.1'
,
cmdclass
=
{
cmdclass
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment