You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wasi-sdk/cmake/wasi-sdk-enable-ccache.cmake

18 lines
493 B

# Helper module to auto-enable ccache if detected.
find_program(CCACHE ccache)
option(WASI_SDK_DISABLE_CCACHE "Force disable ccache even if it's found" OFF)
if(NOT CMAKE_C_COMPILER_LAUNCHER)
if(NOT WASI_SDK_DISABLE_CCACHE)
if(CCACHE)
set(CMAKE_C_COMPILER_LAUNCHER ccache)
set(CMAKE_CXX_COMPILER_LAUNCHER ccache)
message(STATUS "Auto-enabling ccache")
else()
message(STATUS "Failed to auto-enable ccache, not found on system")
endif()
endif()
endif()