Only set CCACHE_PRESENT when it is not already defined

This commit is contained in:
Username404 2021-08-28 23:09:34 +02:00
parent c186f30eef
commit 34691f7a8f
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 1 deletions

View File

@ -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)