feat(sys): pass whisper cmake flags from environment variables
This commit is contained in:
parent
233c7eec36
commit
991a1aefa5
1 changed files with 7 additions and 0 deletions
|
|
@ -147,6 +147,13 @@ fn main() {
|
||||||
config.define("CMAKE_BUILD_TYPE", "RelWithDebInfo");
|
config.define("CMAKE_BUILD_TYPE", "RelWithDebInfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Allow passing any WHISPER cmake flag
|
||||||
|
for (key, value) in env::vars() {
|
||||||
|
if key.starts_with("WHISPER_") && key != "WHISPER_DONT_GENERATE_BINDINGS" {
|
||||||
|
config.define(&key, &value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let destination = config.build();
|
let destination = config.build();
|
||||||
|
|
||||||
if target.contains("window") && !target.contains("gnu") {
|
if target.contains("window") && !target.contains("gnu") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue