From 9b5d5f673c31b020f22f58cde5a9729136086d57 Mon Sep 17 00:00:00 2001 From: WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:50:48 +0100 Subject: [PATCH] Use CCache if it exists --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66d0461a..eed3a896 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,12 @@ if (ENABLE_LTO) endif() endif() +find_program(CCACHE "ccache") +if (CCACHE) + set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) +endif() + option(BUILD_QT_SDL "Build Qt/SDL frontend" ON) add_subdirectory(src)