Unverified Commit a360ff80 authored by Daniele's avatar Daniele Committed by GitHub
Browse files

[CI/Build] CMakeLists: build all extensions' cmake targets at the same time (#5034)

parent 1197e021
......@@ -187,19 +187,22 @@ class cmake_build_ext(build_ext):
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
targets = []
# Build all the extensions
for ext in self.extensions:
self.configure(ext)
targets.append(remove_prefix(ext.name, "vllm."))
ext_target_name = remove_prefix(ext.name, "vllm.")
num_jobs, _ = self.compute_num_jobs()
build_args = [
'--build', '.', '--target', ext_target_name, '-j',
str(num_jobs)
"--build",
".",
f"-j={num_jobs}",
*[f"--target={name}" for name in targets],
]
subprocess.check_call(['cmake', *build_args], cwd=self.build_temp)
subprocess.check_call(["cmake", *build_args], cwd=self.build_temp)
def _is_cuda() -> bool:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment