mirror of https://github.com/WebAssembly/wasi-sdk
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.
18 lines
493 B
18 lines
493 B
6 months ago
|
# 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()
|