Compare commits

..

No commits in common. "b83170ffc860f91d23050992355a4319ce8d41b9" and "22fbef4ae1f553df0d7a9abb7dce20ca57e69e54" have entirely different histories.

View file

@ -210,13 +210,7 @@ std::string ConfigureCMake(const fs::path& cloneDir, const fs::path& cmakeBuildD
} }
std::string BuildCMake(const fs::path& cmakeBuildDir) { std::string BuildCMake(const fs::path& cmakeBuildDir) {
// Without --parallel, the Unix Makefiles generator builds one translation std::string cmd = std::format("cmake --build {}", ShellQuote(fs::absolute(cmakeBuildDir).string()));
// unit at a time, leaving every core but one idle. Pass an explicit job
// count (a bare --parallel maps to an unbounded `make -j` fork bomb on the
// Makefiles generator) so deps like DPP/msquic/glslang compile ~N× faster.
unsigned jobs = std::max(1u, std::thread::hardware_concurrency());
std::string cmd = std::format("cmake --build {} --parallel {}",
ShellQuote(fs::absolute(cmakeBuildDir).string()), jobs);
CommandResult r = RunCommandChecked(cmd); CommandResult r = RunCommandChecked(cmd);
if (r.exitCode != 0) { if (r.exitCode != 0) {
return std::format("cmake --build failed (exit {}): {}", r.exitCode, r.output); return std::format("cmake --build failed (exit {}): {}", r.exitCode, r.output);