Skip to content

gracefully handling of CC/CXX change #97

Open
@Dushistov

Description

@Dushistov

I use something like this in my build.rs:

    let dst = cmake::Config::new(Path::new("couchbase-lite-core"))
        .define("DISABLE_LTO_BUILD", "True")
        .define("MAINTAINER_MODE", "False")
        .define("ENABLE_TESTING", "False")
        .build_target("all")
        .build()
        .join("build");

all fine, until user changed CC/CXX environment variable and force rebuild with already
cached cmake build,
then:

cmake ...
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.

and all my settings is gone, like DISABLE_LTO_BUILD, MAINTAINER_MODE etc.

Can cmake-rs detect if CC/CXX changed and rerun cmake twice? So on the second time it get proper values of variables?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions