cmake: Do not look for ccache if a compiler launcher already exists

This commit is contained in:
Macdu
2022-06-28 20:02:18 +02:00
parent a5dc10d96f
commit 15c517eee5
+6 -4
View File
@@ -12,10 +12,12 @@ set(CMAKE_CXX_EXTENSIONS OFF)
option(USE_DISCORD_RICH_PRESENCE "Build Vita3K with Discord Rich Presence" ON)
option(USE_VULKAN "Build Vita3K with Vulkan backend." OFF)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
if("${CMAKE_CXX_COMPILER_LAUNCHER}" STREQUAL "")
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
endif()
if(MSVC)