From 34691f7a8fcc73516c1a7761cf1a267c2f7d732e Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 28 Aug 2021 23:09:34 +0200 Subject: [PATCH] Only set CCACHE_PRESENT when it is not already defined --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bf32ef..eb09db9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,9 @@ if (NOT MSVC) endif() set(CMAKE_CXX_FLAGS_RELEASE "-Os") -find_program(CCACHE_PRESENT ccache) +if (NOT DEFINED CCACHE_PRESENT) + find_program(CCACHE_PRESENT ccache) +endif() if(CCACHE_PRESENT) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)