Fix inclusion of some C++ interpreter data structures C++ docs

Make sure to generate the public interpreter header file for the docs
xtask unconditionally.
This commit is contained in:
Simon Hausmann 2023-07-17 13:37:54 +02:00
parent a8c07d64c5
commit 7961bd68e5
3 changed files with 10 additions and 4 deletions

View file

@ -693,7 +693,11 @@ fn gen_interpreter(
/// `include_dir` is the output directory
/// Returns the list of all paths that contain dependencies to the generated output. If you call this
/// function from build.rs, feed each entry to stdout prefixed with `cargo:rerun-if-changed=`.
pub fn gen_all(root_dir: &Path, include_dir: &Path) -> anyhow::Result<Vec<PathBuf>> {
pub fn gen_all(
root_dir: &Path,
include_dir: &Path,
include_interpreter: bool,
) -> anyhow::Result<Vec<PathBuf>> {
proc_macro2::fallback::force(); // avoid a abort if panic=abort is set
std::fs::create_dir_all(include_dir).context("Could not create the include directory")?;
let mut deps = Vec::new();
@ -701,7 +705,7 @@ pub fn gen_all(root_dir: &Path, include_dir: &Path) -> anyhow::Result<Vec<PathBu
gen_corelib(root_dir, include_dir, &mut deps)?;
gen_backend_qt(root_dir, include_dir, &mut deps)?;
gen_backend(root_dir, include_dir, &mut deps)?;
if std::env::var("CARGO_FEATURE_SLINT_INTERPRETER").is_ok() {
if include_interpreter {
gen_interpreter(root_dir, include_dir, &mut deps)?;
}
Ok(deps)