]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: s/CCACHE_FOUND/CCACHE_EXECUTABLE/ 39389/head
authorKefu Chai <kchai@redhat.com>
Wed, 10 Feb 2021 03:47:15 +0000 (11:47 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 10 Feb 2021 05:14:27 +0000 (13:14 +0800)
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 <kchai@redhat.com>
CMakeLists.txt

index 985cee4b204f1e16b664cd125c562f9c78fd7b05..550f815d220d5afe76caaf544c523f60a2944ea9 100644 (file)
@@ -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)