build: use CMAKE_C_COMPILER_LAUNCHER for ccache
[vpp.git] / src / cmake / ccache.cmake
index 058a0f3..a7b395b 100644 (file)
@@ -20,8 +20,8 @@ if(VPP_USE_CCACHE)
   message(STATUS "Looking for ccache")
   if(CCACHE_FOUND)
     message(STATUS "Looking for ccache - found")
-    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
-    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+    set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
+    set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
   else(CCACHE_FOUND)
     message(STATUS "Looking for ccache - not found")
   endif(CCACHE_FOUND)