Skip to content

Commit

Permalink
added a warning if submodule not checked out
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDunn committed Feb 1, 2024
1 parent 8554bd7 commit 1df79ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llama-cpp-sys-2/build.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
use std::env;
use std::path::PathBuf;
use std::path::Path;

fn main() {
println!("cargo:rerun-if-changed=llama.cpp");

let cublas_enabled = env::var("CARGO_FEATURE_CUBLAS").is_ok();

if !Path::new("llama.cpp/ggml.c").exists() {
panic!("llama.cpp seems to not be populated, try running `git submodule update --init --recursive` to init.")
}

let mut ggml = cc::Build::new();
let mut ggml_cuda = if cublas_enabled { Some(cc::Build::new()) } else { None };
let mut llama_cpp = cc::Build::new();
Expand Down

0 comments on commit 1df79ce

Please sign in to comment.