[buildcore] Make pybb cmake_build specify --config debug/release
All checks were successful
Build / build (push) Successful in 1m20s
All checks were successful
Build / build (push) Successful in 1m20s
This commit is contained in:
parent
a098cb5ce7
commit
65df731abb
7
deps/buildcore/scripts/pybb.py
vendored
7
deps/buildcore/scripts/pybb.py
vendored
@ -11,6 +11,7 @@
|
|||||||
# "Python Busy Box" - adds cross-platform equivalents to Unix commands that
|
# "Python Busy Box" - adds cross-platform equivalents to Unix commands that
|
||||||
# don't translate well to that other operating system
|
# don't translate well to that other operating system
|
||||||
|
|
||||||
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
@ -57,7 +58,11 @@ def cmake_build(base_path: str, target: Optional[str]) -> int:
|
|||||||
path = os.path.join(base_path, d)
|
path = os.path.join(base_path, d)
|
||||||
if not os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
continue
|
continue
|
||||||
args = ['cmake', '--build', path]
|
args = ['cmake', '--build', path, f'-j{multiprocessing.cpu_count()}']
|
||||||
|
if path.endswith('release'):
|
||||||
|
args.append('--config=release')
|
||||||
|
elif path.endswith('debug'):
|
||||||
|
args.append('--config=debug')
|
||||||
if target is not None:
|
if target is not None:
|
||||||
args.extend(['--target', target])
|
args.extend(['--target', target])
|
||||||
err = subprocess.run(args).returncode
|
err = subprocess.run(args).returncode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user