| 107 | if !artifact.is_file() { |
| 108 | panic!("missing prebuilt renderer artifact at {}", artifact.display()); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | fn emit_upstream_rerun_hints(upstream_root: &Path) { |
| 114 | for path in [ |
| 115 | upstream_root.join("CMakeLists.txt"), |
| 116 | upstream_root.join("src"), |
| 117 | upstream_root.join("include"), |
| 118 | upstream_root.join("standalone_layer_view"), |
| 119 | ] { |
| 120 | println!("cargo:rerun-if-changed={}", path.display()); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | fn run(command: &mut Command, description: &str) { |
| 125 | let status = command.status().unwrap_or_else(|err| { |
| 126 | panic!("failed to {}: {}", description, err); |
| 127 | }); |
| 128 | if !status.success() { |
| 129 | panic!("failed to {}: {}", description, status); |
| 130 | } |
| 131 | } |
| 132 | |