Merge pull request #107 from tazz4843/cmake-change-build-type
Change CMake build type based on Rust build type
This commit is contained in:
commit
eee78dabaa
2 changed files with 7 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ cuda = []
|
|||
opencl = []
|
||||
openblas = []
|
||||
metal = []
|
||||
force-debug = []
|
||||
|
||||
[build-dependencies]
|
||||
cmake = "0.1"
|
||||
|
|
|
|||
|
|
@ -138,6 +138,12 @@ fn main() {
|
|||
config.define("WHISPER_METAL", "OFF");
|
||||
}
|
||||
|
||||
if cfg!(debug_assertions) || cfg!(feature = "force-debug") {
|
||||
// debug builds are too slow to even remotely be usable,
|
||||
// so we build with optimizations even in debug mode
|
||||
config.define("CMAKE_BUILD_TYPE", "RelWithDebInfo");
|
||||
}
|
||||
|
||||
let destination = config.build();
|
||||
|
||||
if env::var("TARGET").unwrap().contains("window") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue