Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass -j to inner make, and ensure tests can build in parallel #47792

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::fs;
use std::io::{BufRead, BufReader};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::thread;

fn main() -> Result<(), Box<dyn Error>> {
let conf = {
Expand Down Expand Up @@ -62,7 +63,10 @@ fn main() -> Result<(), Box<dyn Error>> {
.success());
}

let proc_count = thread::available_parallelism().map_or(1, |x| x.get());

assert!(Command::new(maketool)
.args(["-j", &proc_count.to_string()])
.current_dir(&cpp_src_dir)
.status()?
.success());
Expand Down
2 changes: 0 additions & 2 deletions src/cpp/tests/tests.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ SRC_DIR = $$PWD/..
QZMQ_DIR = $$SRC_DIR/qzmq
RUST_DIR = $$SRC_DIR/../rust

PRE_TARGETDEPS += $$cpp_build_dir/libpushpin-cpp.a

include($$PWD/../../../conf.pri)

INCLUDEPATH += $$SRC_DIR
Expand Down
Loading