mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
CMake: use sccache for compiler caching if ccache not available
Signed-off-by: Be <be@mixxx.org>
This commit is contained in:
parent
3e826589a0
commit
f0b9d8cee7
@ -122,9 +122,17 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
|||||||
find_program( CCACHE_PROGRAM ccache )
|
find_program( CCACHE_PROGRAM ccache )
|
||||||
mark_as_advanced( FORCE CCACHE_PROGRAM )
|
mark_as_advanced( FORCE CCACHE_PROGRAM )
|
||||||
|
|
||||||
|
find_program( SCCACHE_PROGRAM sccache )
|
||||||
|
mark_as_advanced( FORCE SCCACHE_PROGRAM )
|
||||||
|
|
||||||
if( CCACHE_PROGRAM )
|
if( CCACHE_PROGRAM )
|
||||||
message( STATUS "Found ccache: ${CCACHE_PROGRAM}" )
|
message( STATUS "Found ccache: ${CCACHE_PROGRAM}" )
|
||||||
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}" )
|
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}" )
|
||||||
|
elseif( SCCACHE_PROGRAM )
|
||||||
|
message( STATUS "Found sccache: ${SCCACHE_PROGRAM}" )
|
||||||
|
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${SCCACHE_PROGRAM}" )
|
||||||
|
else()
|
||||||
|
message( STATUS "Could NOT find ccache nor sccache, no compiler caching enabled" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Audacity sets this `audacity_` to prefix all CMake options which is not needed and this is not Audacity.
|
# Audacity sets this `audacity_` to prefix all CMake options which is not needed and this is not Audacity.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user