Skip to content
Snippets Groups Projects
Commit 84aa715e authored by Fijxu's avatar Fijxu Committed by Crimson Hawk
Browse files

feature: Use CCACHE if possible

parent b09f9ee1
No related branches found
No related tags found
No related merge requests found
...@@ -70,6 +70,8 @@ CMAKE_DEPENDENT_OPTION(SUYU_USE_FASTER_LD "Check if a faster linker is available ...@@ -70,6 +70,8 @@ CMAKE_DEPENDENT_OPTION(SUYU_USE_FASTER_LD "Check if a faster linker is available
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF) CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
option(USE_CCACHE "Use CCache for faster building" ON)
set(DEFAULT_ENABLE_OPENSSL ON) set(DEFAULT_ENABLE_OPENSSL ON)
if (ANDROID OR WIN32 OR APPLE) if (ANDROID OR WIN32 OR APPLE)
# - Windows defaults to the Schannel backend. # - Windows defaults to the Schannel backend.
...@@ -733,3 +735,17 @@ if(ENABLE_QT AND UNIX AND NOT APPLE) ...@@ -733,3 +735,17 @@ if(ENABLE_QT AND UNIX AND NOT APPLE)
install(FILES "dist/org.suyu_emu.suyu.metainfo.xml" install(FILES "dist/org.suyu_emu.suyu.metainfo.xml"
DESTINATION "share/metainfo") DESTINATION "share/metainfo")
endif() endif()
# Enable CCACHE. Linux only for now.
if (USE_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
if (SUYU_USE_PRECOMPILED_HEADERS)
message(NOTICE "To make use of CCache, set SUYU_USE_PRECOMPILED_HEADERS to OFF or else, it will barely be functional")
endif()
message(STATUS "CCache found.")
else()
message(STATUS "CCache has not been found and it will not be used. Install CCache or set USE_CCACHE to OFF")
endif()
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment