Skip to content

Commit b851b3f

Browse files
authored
cmake : allow user to override default options (ggml-org#8178)
1 parent 139cc62 commit b851b3f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,15 @@ set(GGML_SANITIZE_ADDRESS ${LLAMA_SANITIZE_ADDRESS})
7979
set(GGML_SANITIZE_UNDEFINED ${LLAMA_SANITIZE_UNDEFINED})
8080
set(GGML_ALL_WARNINGS ${LLAMA_ALL_WARNINGS})
8181
set(GGML_FATAL_WARNINGS ${LLAMA_FATAL_WARNINGS})
82-
set(GGML_LLAMAFILE ON)
83-
set(GGML_CUDA_USE_GRAPHS ON)
82+
83+
# change the default for these ggml options
84+
if (NOT DEFINED GGML_LLAMAFILE)
85+
set(GGML_LLAMAFILE ON)
86+
endif()
87+
88+
if (NOT DEFINED GGML_CUDA_USE_GRAPHS)
89+
set(GGML_CUDA_USE_GRAPHS ON)
90+
endif()
8491

8592
# transition helpers
8693
function (llama_option_depr TYPE OLD NEW)

0 commit comments

Comments
 (0)