Skip to content
Snippets Groups Projects
Verified Commit f3c858c1 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Build includes in parallel

parent f25c494a
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
set -ex
set -e
include="$(realpath "$1")"
cbindgen="$(realpath cbindgen)"
cargo build --release --manifest-path cbindgen/Cargo.toml
cbindgen="$(realpath target/release/cbindgen)"
jobs=()
for config in src/header/*/cbindgen.toml
do
dir="$(dirname "$config")"
......@@ -13,8 +16,13 @@ do
then
header="$include/${name/_//}.h"
pushd "$dir"
cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \
-c cbindgen.toml -o "$header" mod.rs
"$cbindgen" -c cbindgen.toml -o "$header" mod.rs &
jobs+=($!)
popd
fi
done
for job in "${jobs[@]}"
do
wait "$job"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment