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
ktransformers
Commits
0cdc446a
Commit
0cdc446a
authored
Feb 20, 2025
by
miaooo0000OOOO
Browse files
默认并行编译
parent
b4fb6339
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
setup.py
setup.py
+6
-1
No files found.
setup.py
View file @
0cdc446a
...
...
@@ -276,8 +276,13 @@ class CMakeBuild(BuildExtension):
"-DCMAKE_OSX_ARCHITECTURES={}"
.
format
(
";"
.
join
(
archs
))]
if
"CMAKE_BUILD_PARALLEL_LEVEL"
not
in
os
.
environ
:
cpu_count
=
os
.
cpu_count
()
if
cpu_count
is
None
:
cpu_count
=
1
if
hasattr
(
self
,
"parallel"
)
and
self
.
parallel
:
build_args
+=
[
f
"-j
{
self
.
parallel
}
"
]
build_args
+=
[
f
"--parallel=
{
self
.
parallel
}
"
]
else
:
build_args
+=
[
f
"--parallel=
{
cpu_count
}
"
]
print
(
"CMake args:"
,
cmake_args
)
build_temp
=
Path
(
ext
.
sourcedir
)
/
"build"
if
not
build_temp
.
exists
():
...
...
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