feat(sys): pass whisper cmake flags from environment variables

This commit is contained in:
thewh1teagle 2024-05-28 21:04:03 +03:00
parent 233c7eec36
commit 991a1aefa5
No known key found for this signature in database
GPG key ID: F7BFC3A4192804E4

View file

@ -147,6 +147,13 @@ fn main() {
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();
if target.contains("window") && !target.contains("gnu") {