Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
63576251
Commit
63576251
authored
Mar 22, 2019
by
traveller59
Browse files
fix ubuntu build problem after add windows support
parent
af03d4f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
setup.py
setup.py
+3
-4
src/utils/CMakeLists.txt
src/utils/CMakeLists.txt
+1
-0
No files found.
setup.py
View file @
63576251
...
...
@@ -46,9 +46,8 @@ class CMakeBuild(build_ext):
'-DPYBIND11_PYTHON_VERSION={}'
.
format
(
PYTHON_VERSION
),
'-DSPCONV_BuildTests=OFF'
,
'-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr"'
]
assert
self
.
debug
is
False
,
"pytorch ops don't support debug build."
cfg
=
'Debug'
if
self
.
debug
else
'Release'
# cfg = 'Debug'
assert
cfg
==
"Release"
,
"pytorch ops don't support debug build."
build_args
=
[
'--config'
,
cfg
]
print
(
cfg
)
if
platform
.
system
()
==
"Windows"
:
...
...
@@ -60,7 +59,7 @@ class CMakeBuild(build_ext):
cmake_args
+=
[
'-A'
,
'x64'
]
build_args
+=
[
'--'
,
'/m'
]
else
:
cmake_args
+=
[
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}'
.
format
(
extdir
+
str
(
Path
(
extdir
)
/
"spconv"
))]
cmake_args
+=
[
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}'
.
format
(
str
(
Path
(
extdir
)
/
"spconv"
))]
cmake_args
+=
[
'-DCMAKE_BUILD_TYPE='
+
cfg
]
build_args
+=
[
'--'
,
'-j4'
]
...
...
@@ -69,7 +68,7 @@ class CMakeBuild(build_ext):
self
.
distribution
.
get_version
())
if
not
os
.
path
.
exists
(
self
.
build_temp
):
os
.
makedirs
(
self
.
build_temp
)
print
(
"|||||||||"
,
cmake_args
)
print
(
"|||||
CMAKE ARGS|
||||"
,
cmake_args
)
subprocess
.
check_call
([
'cmake'
,
ext
.
sourcedir
]
+
cmake_args
,
cwd
=
self
.
build_temp
,
env
=
env
)
subprocess
.
check_call
([
'cmake'
,
'--build'
,
'.'
]
+
build_args
,
cwd
=
self
.
build_temp
)
...
...
src/utils/CMakeLists.txt
View file @
63576251
...
...
@@ -4,6 +4,7 @@ set_target_properties(spconv_nms PROPERTIES SOVERSION 1)
target_include_directories
(
spconv_nms PRIVATE
${
ALL_INCLUDE
}
)
set_property
(
TARGET spconv_nms PROPERTY CXX_STANDARD 14
)
set_property
(
TARGET spconv_nms PROPERTY CUDA_STANDARD 14
)
set_property
(
TARGET spconv_nms PROPERTY POSITION_INDEPENDENT_CODE ON
)
target_link_libraries
(
spconv_nms
${
CUDA_CUDART
}
)
install
(
TARGETS spconv_nms DESTINATION lib
)
...
...
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