From 159b7e7ee78a22da9ed1828849fad227f9a733dd Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 22 May 2025 20:41:30 -0500 Subject: [PATCH] [buildcore] Make pybb cmake_build specify --config debug/release --- deps/buildcore/scripts/pybb.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deps/buildcore/scripts/pybb.py b/deps/buildcore/scripts/pybb.py index 42860895..f9e73a8d 100755 --- a/deps/buildcore/scripts/pybb.py +++ b/deps/buildcore/scripts/pybb.py @@ -11,6 +11,7 @@ # "Python Busy Box" - adds cross-platform equivalents to Unix commands that # don't translate well to that other operating system +import multiprocessing import os import platform import shutil @@ -57,7 +58,11 @@ def cmake_build(base_path: str, target: Optional[str]) -> int: path = os.path.join(base_path, d) if not os.path.isdir(path): 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: args.extend(['--target', target]) err = subprocess.run(args).returncode