From 7df1a5d00a22a4ec0948abda84c6aef4abbe2f71 Mon Sep 17 00:00:00 2001 From: Jacob Oursland Date: Wed, 27 Nov 2024 18:32:25 -0800 Subject: [PATCH] CMake: modernize to use CMAKE__COMPILER_LAUNCHER for ccache. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e94db800da..00f2211bfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,9 @@ option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON) if(FREECAD_USE_CCACHE) find_program(CCACHE_PROGRAM ccache) #This check should occur before project() if(CCACHE_PROGRAM) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") - message(NOTICE "-- Using ccache found at: " ${CCACHE_PROGRAM}) + message(STATUS "Using ccache found at: " ${CCACHE_PROGRAM}) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") endif() endif()