[buildcore] Make cmake-build command ignore build directories that are not directories

This commit is contained in:
Gary Talent 2023-06-05 21:17:50 -05:00
parent f8eaf9b325
commit aff3b04fe2

View File

@ -52,7 +52,10 @@ def cmake_build(base_path: str, target: Optional[str]) -> int:
# nothing to build # nothing to build
return 0 return 0
for d in os.listdir(base_path): for d in os.listdir(base_path):
args = ['cmake', '--build', os.path.join(base_path, d)] path = os.path.join(base_path, d)
if not os.path.isdir(path):
continue
args = ['cmake', '--build', path]
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