From: Kefu Chai Date: Wed, 10 Feb 2021 03:47:15 +0000 (+0800) Subject: cmake: s/CCACHE_FOUND/CCACHE_EXECUTABLE/ X-Git-Tag: v17.1.0~2985^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39389%2Fhead;p=ceph.git 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 --- 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)