From 92d2ec74306f1135ec9842c99da274e43e2796f1 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 10 Feb 2021 11:47:15 +0800 Subject: [PATCH] cmake: s/CCACHE_FOUND/CCACHE_EXECUTABLE/ to be more consistent with other find_program() calls. and more correct this way, as ${CCACHE_FOUND} is not a boolean, it is a path pointing to the found cache executable. Signed-off-by: Kefu Chai --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 985cee4b204f..550f815d220d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,16 +56,16 @@ endif() option(WITH_CCACHE "Build with ccache.") if(WITH_CCACHE) - find_program(CCACHE_FOUND ccache) - if(NOT CCACHE_FOUND) + find_program(CCACHE_EXECUTABLE ccache) + if(NOT CCACHE_EXECUTABLE) message(FATAL_ERROR "Can't find ccache. Is it installed?") endif() - message(STATUS "Building with ccache: ${CCACHE_FOUND}, CCACHE_DIR=$ENV{CCACHE_DIR}") - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + message(STATUS "Building with ccache: ${CCACHE_EXECUTABLE}, CCACHE_DIR=$ENV{CCACHE_DIR}") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_EXECUTABLE}") # ccache does not accelerate link (ld), but let it handle it. by passing it # along with cc to python's distutils, we are able to workaround # https://bugs.python.org/issue8027. - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_EXECUTABLE}") endif(WITH_CCACHE) option(WITH_MANPAGE "Build man pages." ON) -- 2.47.3