fix: helpful message when llama.cpp submodule is not present (#719) (#775)

release-fix-intellij-update-support-version-range
Maciej 2023-11-13 08:51:46 +01:00 committed by GitHub
parent e0017cadec
commit ebbe6e5af8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,15 @@
use std::path::Path;
use cmake::Config; use cmake::Config;
fn main() { fn main() {
const LLAMA_CMAKE_PATH: &str = "llama.cpp/CMakeLists.txt";
assert!(
Path::new(LLAMA_CMAKE_PATH).exists(),
"Please init submodules with `git submodule update --init --recursive` and try again"
);
println!("cargo:rerun-if-changed=cc/*.h"); println!("cargo:rerun-if-changed=cc/*.h");
println!("cargo:rerun-if-changed=cc/*.cc"); println!("cargo:rerun-if-changed=cc/*.cc");
println!("cargo:rustc-link-lib=llama"); println!("cargo:rustc-link-lib=llama");