Skip to content

Commit c7d621d

Browse files
JohannesGaesslerNeo Zhang
authored andcommitted
make/cmake: LLAMA_NO_CCACHE -> GGML_NO_CCACHE (ggml-org#8392)
1 parent 5c10e23 commit c7d621d

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ endif()
5050
# option list
5151
#
5252

53-
# general
54-
option(LLAMA_CCACHE "llama: use ccache if available" ON)
55-
5653
# debug
5754
option(LLAMA_ALL_WARNINGS "llama: enable all compiler warnings" ON)
5855
option(LLAMA_ALL_WARNINGS_3RD_PARTY "llama: enable all compiler warnings in 3rd party libs" OFF)
@@ -77,7 +74,6 @@ option(LLAMA_CURL "llama: use libcurl to download model from an URL" OFF)
7774
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake)
7875

7976
# override ggml options
80-
set(GGML_CCACHE ${LLAMA_CCACHE})
8177
set(GGML_SANITIZE_THREAD ${LLAMA_SANITIZE_THREAD})
8278
set(GGML_SANITIZE_ADDRESS ${LLAMA_SANITIZE_ADDRESS})
8379
set(GGML_SANITIZE_UNDEFINED ${LLAMA_SANITIZE_UNDEFINED})

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,22 @@ MK_CFLAGS = -std=c11 -fPIC
240240
MK_CXXFLAGS = -std=c++11 -fPIC
241241
MK_NVCCFLAGS = -std=c++11
242242

243-
ifndef LLAMA_NO_CCACHE
243+
ifdef LLAMA_NO_CCACHE
244+
GGML_NO_CCACHE := 1
245+
DEPRECATE_WARNING := 1
246+
endif
247+
248+
ifndef GGML_NO_CCACHE
244249
CCACHE := $(shell which ccache)
245250
ifdef CCACHE
246251
export CCACHE_SLOPPINESS = time_macros
247-
$(info I ccache found, compilation results will be cached. Disable with LLAMA_NO_CCACHE.)
252+
$(info I ccache found, compilation results will be cached. Disable with GGML_NO_CCACHE.)
248253
CC := $(CCACHE) $(CC)
249254
CXX := $(CCACHE) $(CXX)
250255
else
251256
$(info I ccache not found. Consider installing it for faster compilation.)
252257
endif # CCACHE
253-
endif # LLAMA_NO_CCACHE
258+
endif # GGML_NO_CCACHE
254259

255260
# clock_gettime came in POSIX.1b (1993)
256261
# CLOCK_MONOTONIC came in POSIX.1-2001 / SUSv3 as optional
@@ -921,6 +926,7 @@ $(info - LLAMA_NO_LLAMAFILE)
921926
$(info - LLAMA_NO_ACCELERATE)
922927
$(info - LLAMA_NO_OPENMP)
923928
$(info - LLAMA_NO_METAL)
929+
$(info - LLAMA_NO_CCACHE)
924930
$(info )
925931
endif
926932

0 commit comments

Comments
 (0)