Skip to content

Commit f0f72eb

Browse files
committed
feat(ccache): Add ccache for unix building systems
1 parent ea598f1 commit f0f72eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/cmake/idf.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,11 @@ if(NOT __idf_env_set)
4343
__build_init("${idf_path}")
4444

4545
set_property(GLOBAL PROPERTY __IDF_ENV_SET 1)
46+
endif()
47+
48+
find_program(CCACHE_PROGRAM ccache)
49+
if(CCACHE_PROGRAM)
50+
# Support Unix Makefiles and Ninja
51+
set(CMAKE_C_COMPILER_LAUNCHER "ccache")
52+
set(CMAKE_CXX_COMPILER_LAUNCHER "ccache")
4653
endif()

0 commit comments

Comments
 (0)