Struct cpp_to_rust_common::cpp_build_config::CppBuildPaths
[−]
[src]
pub struct CppBuildPaths { /* fields omitted */ }
Machine-specific information required to build the C++ wrapper library. This type holds configuration properties that cannot be determined at the time of crate generation because they are always platform-dependent.
By default, all path lists are empty, and the build script doesn't add
any extra directories to paths while compiling and linking the crate.
If CPP_TO_RUST_LIB_PATHS
, CPP_TO_RUST_FRAMEWORK_PATHS
or
CPP_TO_RUST_INCLUDE_PATHS
environment variables are present during
execution of the build script, their values are used. A custom
build script can get an object of this type using Config::cpp_build_paths_mut
and use its API to set extra search paths.
This type is currently only used in cpp_to_rust_build_tools
, but
cpp_to_rust_generator
may start to use it in the future if needed.
Methods
impl CppBuildPaths
[src]
fn new() -> CppBuildPaths
[src]
Constructs an empty configuration object.
fn add_lib_path<P: Into<PathBuf>>(&mut self, path: P)
[src]
Adds path
to a lib directory.
It's supplied to the linker via -L
option or environment variables.
fn add_framework_path<P: Into<PathBuf>>(&mut self, path: P)
[src]
Adds path
to a framework directory (OS X specific).
It's supplied to the linker via -F
option or environment variables.
fn add_include_path<P: Into<PathBuf>>(&mut self, path: P)
[src]
Adds path
to an include directory.
It's supplied to the C++ parser
and the C++ compiler via -I
option.
fn apply_env(&mut self)
[src]
If CPP_TO_RUST_LIB_PATHS
, CPP_TO_RUST_FRAMEWORK_PATHS
or
CPP_TO_RUST_INCLUDE_PATHS
environment variables are present,
their values override current values of the object.
fn lib_paths(&self) -> &[PathBuf]
[src]
Returns paths added via add_lib_path
.
fn framework_paths(&self) -> &[PathBuf]
[src]
Returns paths added via add_framework_path
.
fn include_paths(&self) -> &[PathBuf]
[src]
Returns paths added via add_include_path
.
Trait Implementations
impl Debug for CppBuildPaths
[src]
impl Default for CppBuildPaths
[src]
fn default() -> CppBuildPaths
[src]
Returns the "default value" for a type. Read more
impl Clone for CppBuildPaths
[src]
fn clone(&self) -> CppBuildPaths
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more