From b851b3fba0a1b06a1129189bac300e07dd1648c8 Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 28 Jun 2024 12:37:45 +0200 Subject: [PATCH] cmake : allow user to override default options (#8178) --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dba083089..e3a0cc369 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,8 +79,15 @@ set(GGML_SANITIZE_ADDRESS ${LLAMA_SANITIZE_ADDRESS}) set(GGML_SANITIZE_UNDEFINED ${LLAMA_SANITIZE_UNDEFINED}) set(GGML_ALL_WARNINGS ${LLAMA_ALL_WARNINGS}) set(GGML_FATAL_WARNINGS ${LLAMA_FATAL_WARNINGS}) -set(GGML_LLAMAFILE ON) -set(GGML_CUDA_USE_GRAPHS ON) + +# change the default for these ggml options +if (NOT DEFINED GGML_LLAMAFILE) + set(GGML_LLAMAFILE ON) +endif() + +if (NOT DEFINED GGML_CUDA_USE_GRAPHS) + set(GGML_CUDA_USE_GRAPHS ON) +endif() # transition helpers function (llama_option_depr TYPE OLD NEW)