Merge pull request #152 from thewh1teagle/feat/pass-whisper-cmake-flags

feat(sys): pass whisper cmake flags from environment variables
This commit is contained in:
Niko 2024-05-28 22:04:07 +00:00 committed by GitHub
commit 9e07fba125
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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") {