Struct nvbit_build::Build
source · 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 Selfwhere P: IntoIterator, P::Item: Into<PathBuf>,
pub fn instrumentation_source<P: Into<PathBuf>>(&mut self, src: P) -> &mut Self
pub fn instrumentation_sources<P>(&mut self, sources: P) -> &mut Selfwhere P: IntoIterator, P::Item: Into<PathBuf>,
pub fn source<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
pub fn sources<P>(&mut self, sources: P) -> &mut Selfwhere P: IntoIterator, P::Item: Into<PathBuf>,
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 Selfwhere
I: IntoIterator,
I::Item: Into<String>,
pub fn nvcc_flags<I>(&mut self, flags: I) -> &mut Selfwhere I: IntoIterator, I::Item: Into<String>,
Add arbitrary flags to the invocation of nvcc.
sourcepub fn host_compiler_flags<I>(&mut self, flags: I) -> &mut Selfwhere
I: IntoIterator,
I::Item: Into<String>,
pub fn host_compiler_flags<I>(&mut self, flags: I) -> &mut Selfwhere I: IntoIterator, I::Item: Into<String>,
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 Selfwhere P: IntoIterator, P::Item: Into<PathBuf>,
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 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