pub struct Build { /* private fields */ }Implementations§
Source§impl Build
impl Build
pub fn new() -> Self
Sourcepub fn compile<O: AsRef<str>>(&self, output: O) -> Result<(), Error>
pub fn compile<O: AsRef<str>>(&self, output: O) -> Result<(), Error>
Compile and link static library with given name from inputs.
§Errors
When compilation fails, an error is returned.
Sourcepub fn host_compiler<P: Into<PathBuf>>(&mut self, compiler: P) -> &mut Self
pub fn host_compiler<P: Into<PathBuf>>(&mut self, compiler: P) -> &mut Self
Configures the host compiler to be used to produce output.
Sourcepub fn nvcc_compiler<P: Into<PathBuf>>(&mut self, compiler: P) -> &mut Self
pub fn nvcc_compiler<P: Into<PathBuf>>(&mut self, compiler: P) -> &mut Self
Configures the host compiler to be used to produce output.
pub fn object<P: Into<PathBuf>>(&mut self, obj: P) -> &mut Self
pub fn objects<P>(&mut self, objects: P) -> &mut Self
pub fn instrumentation_source<P: Into<PathBuf>>(&mut self, src: P) -> &mut Self
pub fn instrumentation_sources<P>(&mut self, sources: P) -> &mut Self
pub fn source<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
pub fn sources<P>(&mut self, sources: P) -> &mut Self
Sourcepub fn nvcc_flag<F: Into<String>>(&mut self, flag: F) -> &mut Build
pub fn nvcc_flag<F: Into<String>>(&mut self, flag: F) -> &mut Build
Add an arbitrary flag to the invocation of nvcc.
Sourcepub fn host_compiler_flag<F: Into<String>>(&mut self, flag: F) -> &mut Build
pub fn host_compiler_flag<F: Into<String>>(&mut self, flag: F) -> &mut Build
Add an arbitrary flag to the invocation of the host compiler.
Sourcepub fn nvcc_flags<I>(&mut self, flags: I) -> &mut Self
pub fn nvcc_flags<I>(&mut self, flags: I) -> &mut Self
Add arbitrary flags to the invocation of nvcc.
Sourcepub fn host_compiler_flags<I>(&mut self, flags: I) -> &mut Self
pub fn host_compiler_flags<I>(&mut self, flags: I) -> &mut Self
Add arbitrary flags to the invocation of the host compiler.
pub fn include<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
pub fn includes<P>(&mut self, dirs: P) -> &mut Self
pub fn warnings(&mut self, enable: bool) -> &mut Self
pub fn warnings_as_errors(&mut self, enable: bool) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Build
impl RefUnwindSafe for Build
impl Send for Build
impl Sync for Build
impl Unpin for Build
impl UnwindSafe for Build
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more