File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 5
5
# Optional features and packages.
6
6
7
7
if (CCACHE )
8
- find_program (CCACHE_EXECUTABLE ccache )
9
- if (CCACHE_EXECUTABLE )
8
+ find_program (CCACHE_COMMAND ccache )
9
+ if (CCACHE_COMMAND )
10
10
if (MSVC )
11
11
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.24 )
12
12
# ccache >= 4.8 requires compile batching turned off that is available since CMake 3.24.
13
13
# See https://github.com/ccache/ccache/wiki/MS-Visual-Studio
14
14
set (CCACHE ON )
15
- set (MSVC_CCACHE_WRAPPER_CONTENT "\" ${CCACHE_EXECUTABLE } \" \" ${CMAKE_CXX_COMPILER} \" " )
15
+ set (MSVC_CCACHE_WRAPPER_CONTENT "\" ${CCACHE_COMMAND } \" \" ${CMAKE_CXX_COMPILER} \" " )
16
16
set (MSVC_CCACHE_WRAPPER_FILENAME wrapped-cl.bat )
17
17
file (WRITE ${CMAKE_BINARY_DIR} /${MSVC_CCACHE_WRAPPER_FILENAME} "${MSVC_CCACHE_WRAPPER_CONTENT} %*" )
18
18
list (APPEND CMAKE_VS_GLOBALS
@@ -30,15 +30,15 @@ if(CCACHE)
30
30
endif ()
31
31
else ()
32
32
set (CCACHE ON )
33
- list (APPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE } )
34
- list (APPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE } )
33
+ list (APPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_COMMAND } )
34
+ list (APPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_COMMAND } )
35
35
endif ()
36
36
elseif (CCACHE STREQUAL "AUTO" )
37
37
set (CCACHE OFF )
38
38
else ()
39
39
message (FATAL_ERROR "ccache requested, but not found." )
40
40
endif ()
41
- mark_as_advanced (CCACHE_EXECUTABLE )
41
+ mark_as_advanced (CCACHE_COMMAND )
42
42
endif ()
43
43
44
44
if (WITH_NATPMP )
You can’t perform that action at this time.
0 commit comments