From ca98cb793c63a981a1a4b36e432d70ab25c3754d Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Tue, 30 Jan 2024 12:47:41 +0000 Subject: [PATCH] Speedup compilation on all platforms --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1afcab92..766f9699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,16 @@ ADD_DEFINITIONS( -DUSE_SOAPY_SDR=1 ) +find_program(CCACHE "ccache") +if(CCACHE) + set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) + if(APPLE) + set(CMAKE_OBJCXX_COMPILER_LAUNCHER ${CCACHE}) + endif() + set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros) +endif(CCACHE) + IF (WIN32) set(wxWidgets_USE_STATIC ON)