Skip to content

Commit 5ca2f4b

Browse files
committed
Align documentation to no longer set cxxbridge_flags manually
1 parent 9d68140 commit 5ca2f4b

File tree

5 files changed

+9
-17
lines changed

5 files changed

+9
-17
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ cxxbridge-flags = { version = "=0.4.7", path = "flags", default-features = false
3030
[dev-dependencies]
3131
cxx-build = { version = "=0.4.7", path = "gen/build" }
3232
cxx-test-suite = { version = "0", path = "tests/ffi" }
33-
cxxbridge-flags = { version = "=0.4.7", path = "flags", default-features = false }
3433
rustversion = "1.0"
3534
trybuild = { version = "1.0.33", features = ["diff"] }
3635

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ cxx = "0.4"
233233

234234
[build-dependencies]
235235
cxx-build = "0.4"
236-
cxxbridge-flags = "0.4"
237236
```
238237

239238
```rust
@@ -242,7 +241,6 @@ cxxbridge-flags = "0.4"
242241
fn main() {
243242
cxx_build::bridge("src/main.rs") // returns a cc::Build
244243
.file("src/demo.cc")
245-
.flag_if_supported(cxxbridge_flags::STD)
246244
.compile("cxxbridge-demo");
247245

248246
println!("cargo:rerun-if-changed=src/main.rs");

gen/build/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
//! C++ code generator, set up any additional compiler flags depending on
55
//! the use case, and make the C++ compiler invocation.
66
//!
7-
//! Set CXX features such as support of a different C++ standard - default is
8-
//! C++11 - by setting the feature on the CXX crate. This ensures that the CXX
9-
//! bridge library code in cxx.h|cc gets compiled with the same feature flags
10-
//! as your code.
7+
//! CXX create features, such as support of a different C++ standard, are
8+
//! are automatically set if using cxx_build. This ensures that your code
9+
//! gets compiled with the same feature flags as the CXX bridge library code
10+
//! in cxx.h|cc. See the CXX crate for available features.
1111
//!
1212
//! <br>
1313
//!
@@ -21,7 +21,6 @@
2121
//! fn main() {
2222
//! cxx_build::bridge("src/main.rs")
2323
//! .file("src/demo.cc")
24-
//! .flag_if_supported(cxxbridge_flags::STD)
2524
//! .compile("cxxbridge-demo");
2625
//!
2726
//! println!("cargo:rerun-if-changed=src/main.rs");
@@ -92,7 +91,6 @@ pub fn bridge(rust_source_file: impl AsRef<Path>) -> Build {
9291
/// let source_files = vec!["src/main.rs", "src/path/to/other.rs"];
9392
/// cxx_build::bridges(source_files)
9493
/// .file("src/demo.cc")
95-
/// .flag_if_supported(cxxbridge_flags::STD)
9694
/// .compile("cxxbridge-demo");
9795
/// ```
9896
#[must_use]

src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@
218218
//! runs CXX's C++ code generator and compiles the resulting C++ code along with
219219
//! any other C++ code for your crate.
220220
//!
221-
//! Set CXX features such as support of a different C++ standard - default is
222-
//! C++11 - by setting the feature on the CXX crate. This ensures that the CXX
223-
//! bridge library code in cxx.h|cc gets compiled with the same feature flags
224-
//! as your code.
221+
//! CXX create features, such as support of a different C++ standard, are
222+
//! are automatically set if using cxx_build. This ensures that your code
223+
//! gets compiled with the same feature flags as the CXX bridge library code
224+
//! in cxx.h|cc. See the CXX crate for available features.
225225
//!
226226
//! The canonical build script is as follows. The indicated line returns a
227227
//! [`cc::Build`] instance (from the usual widely used `cc` crate) on which you
@@ -239,7 +239,6 @@
239239
//!
240240
//! [build-dependencies]
241241
//! cxx-build = "0.4"
242-
//! cxxbridge-flags = "0.4"
243242
//! ```
244243
//!
245244
//! ```no_run
@@ -248,7 +247,6 @@
248247
//! fn main() {
249248
//! cxx_build::bridge("src/main.rs") // returns a cc::Build
250249
//! .file("src/demo.cc")
251-
//! .flag_if_supported(cxxbridge_flags::STD)
252250
//! .compile("cxxbridge-demo");
253251
//!
254252
//! println!("cargo:rerun-if-changed=src/main.rs");

third-party/Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)