From 6e18c8f7f1874690be0b8dfafc09c571cd9f8895 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 24 Oct 2019 09:36:14 +0200 Subject: [PATCH] make ccache optional --- 3rdParty/iresearch/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/3rdParty/iresearch/CMakeLists.txt b/3rdParty/iresearch/CMakeLists.txt index 78f8e59f81a8..615e198be800 100644 --- a/3rdParty/iresearch/CMakeLists.txt +++ b/3rdParty/iresearch/CMakeLists.txt @@ -52,11 +52,15 @@ endif() ### setup ccache ################################################################################ -find_program(CCACHE_FOUND ccache) +option(USE_CCACHE "Use CCACHE if present" ON) -if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) -endif(CCACHE_FOUND) +if (USE_CCACHE) + find_program(CCACHE_FOUND ccache) + + if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + endif(CCACHE_FOUND) +endif() if (USE_OPTIMIZE_FOR_ARCHITECTURE) include(OptimizeForArchitecture)