Lines Matching refs:build
3 //! This is intended to be used from Cargo build scripts to execute CXX's
11 //! Example of a canonical Cargo build script that builds a CXX bridge:
14 //! // build.rs
28 //! A runnable working setup with this build script is shown in the *demo*
42 //! $ cargo install cxxbridge-cmd # or build it from the repo
48 #![doc(html_root_url = "https://docs.rs/cxx-build/1.0.97")]
117 /// method to execute the C++ build.
138 build(rust_source_files).unwrap_or_else(|err| {
160 // condition depending on what order Cargo randomly executes the build
193 // subdirectory to avoid stomping on other things that the caller's build script
212 // current build as well as for downstream builds that have a direct dependency
214 fn build(rust_source_files: &mut dyn Iterator<Item = impl AsRef<Path>>) -> Result<Build> {
219 let mut build = Build::new();
220 build.cpp(true);
221 build.cpp_link_stdlib(None); // linked via link-cplusplus crate
224 generate_bridge(prj, &mut build, path.as_ref())?;
230 build.include(&header_dir.path);
238 Ok(build)
398 fn generate_bridge(prj: &Project, build: &mut Build, rust_source_file: &Path) -> Result<()> {
422 build.file(implementation_path);