-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build issue when MAINTAINER_MODE=OFF / not set
It appears that when MAINTAINER_MODE=ON, the change in that environment variable for the demorust ( lib/rust ) module causes the build.rs script to be re-run. I think that's because the MAINTAINER_MODE variable may not be passed to `cargo test` from `ctest`, while it is passed to `cargo build` from `cmake`. However, when MAINTAINER_MODE=OFF there is no change in the environment variables passed and so `build.rs` is not re-run for `cargo test`. As a consequence, it never links the test executable with the required librar(ies). The primary change in this commit to fix that is to move: ```rust println!("cargo:rerun-if-env-changed=LIBDEMO"); ``` out of the "test" match case so it applies in general. That seems to fix it. I'm ... not 100% sure why, but it works for me!
- Loading branch information
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters